diff --git a/sample.APKBUILD b/sample.APKBUILD index de6485d99150b23b03f496aabc05a2a551303a1c..5341fb43b2cd912b343f2824280f1de026d88be6 100644 --- a/sample.APKBUILD +++ b/sample.APKBUILD @@ -1,7 +1,5 @@ # This is an example APKBUILD file. Use this as a start to creating your own, # and remove these comments. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. # Contributor: Your Name <youremail@domain.com> maintainer="Your Name <youremail@domain.com>" @@ -11,22 +9,22 @@ pkgrel=0 pkgdesc="" url="" arch="all" -license="GPL" +license="unknown" depends= depends_dev= makedepends="$depends_dev" install= subpackages="$pkgname-dev $pkgname-doc" -source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" +source="https://downloads.sourceforge.net/NAME/NAME-$pkgver.tar.gz" builddir="$srcdir"/$pkgname-$pkgver prepare() { - cd "$builddir" + default_prepare + # When needed add additional preparation below. Otherwise remove this function } build() { - cd "$builddir" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ @@ -35,7 +33,6 @@ build() { } package() { - cd "$builddir" make DESTDIR="$pkgdir" install # remove the 2 lines below (and this) if there is no init.d script @@ -44,9 +41,8 @@ package() { } check() { - # uncomment the 2 lines below if there is a testsuite. we assume the testsuite + # uncomment the line below if there is a testsuite. we assume the testsuite # is run using "make check", which is the default for autotools-based build systems. - # cd "$builddir" # make check } diff --git a/sample.confd b/sample.confd index 726269524b1a98aca320ae812ce8b98949c58694..4f55bcbe6fb6796299d560be6c20574a1500c240 100644 --- a/sample.confd +++ b/sample.confd @@ -1,7 +1,7 @@ # Configuration for /etc/init.d/<SERVICE> # User (and group) to run <SERVICE> as. -#command_user="<USER>" +#command_user="<USER>[:<GROUP>]" # Additional arguments for <SERVICE> daemon. #command_args= diff --git a/sample.initd b/sample.initd index 1fcf9b3b296fd894f0e91b88345bce24a79db7c7..5cdb12ee5e8abb0c8abd123bbb14381b20b2b613 100644 --- a/sample.initd +++ b/sample.initd @@ -3,10 +3,10 @@ name="SampleService" description="Sample init.d file for Alpine Linux" -: ${command_user:="<USER>"} +: "${command_user:="<USER>"}" command="/usr/sbin/<SERVICE>" -command_args="$command_args" +: "${command_args:="--default-args"}" command_background="yes" pidfile="/run/$RC_SVCNAME.pid"