~martijnbraam/createaport

Generate an Alpine Linux APKBUILD from a repository

f6be839 Add automake support

17 days ago
25 days ago

#Create Aport

A command line utility that tries to guess a complete APKBUILD file for a repository URL.

#Example:

$ createaport https://gitlab.com/mobian1/devices/eg25-manager
pkgname=eg25-manager
pkgver=0.3.0
pkgrel=0
pkgdesc="Manager daemon for the Quectel EG25 mobile broadband modem"
url="https://gitlab.com/mobian1/devices/eg25-manager"
arch="all"
license="GPL-3.0"
source="https://gitlab.com/mobian1/devices/eg25-manager/-/archive/0.3.0/eg25-manager-0.3.0.tar.gz"
makedepends="meson libusb-dev glib-dev modemmanager-dev libgudev-dev libgpiod-dev"

build(){
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check(){
	meson test --no-rebuild -C output
}

package(){
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
$ createaport https://github.com/f1xpl/openauto
# WARNING: Could not auto-detect the license
pkgname=openauto
pkgver=v1.1.1
pkgrel=0
pkgdesc="AndroidAuto headunit emulator"
url="https://github.com/f1xpl/openauto"
arch="all"
license=""
source="https://github.com/f1xpl/openauto/archive/v1.1.1/openauto-v1.1.1.tar.gz"
makedepends="cmake"

build(){
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check(){
	cd build && ctest
}

package(){
	DESTDIR="$pkgdir" cmake --install build
}