summaryrefslogtreecommitdiffstats
path: root/main/opennhrp/APKBUILD
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-04-19 19:05:31 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-04-19 19:06:22 +0300
commitb776b1f9a6275352a0b1b431645d345177d5d0a6 (patch)
tree43fa665a0d3669144f775b5e7568f978b54755cc /main/opennhrp/APKBUILD
parentb818ca056b96af851a92dcb77cac73426f035cd3 (diff)
downloadaports-b776b1f9a6275352a0b1b431645d345177d5d0a6.tar.bz2
aports-b776b1f9a6275352a0b1b431645d345177d5d0a6.tar.xz
main/opennhrp: fix apkbuild
Diffstat (limited to 'main/opennhrp/APKBUILD')
-rw-r--r--main/opennhrp/APKBUILD24
1 files changed, 17 insertions, 7 deletions
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD
index b0ea72a32..f78ac9462 100644
--- a/main/opennhrp/APKBUILD
+++ b/main/opennhrp/APKBUILD
@@ -19,19 +19,29 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
$pkgname.confd
"
-build() {
- cd "$srcdir"/$pkgname-$pkgver
- for i in ../*.patch; do
- msg "Applying $i"
- patch -p1 < $i || return 1
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 < "$srcdir"/$i || return 1
+ ;;
+ esac
done
-
sed -i -e 's/-Werror//' Make.rules
+}
+
+build() {
+ cd "$_builddir"
make || return 1
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$_builddir"
make DESTDIR="$pkgdir" install
install -Dm755 "$srcdir"/opennhrp.initd "$pkgdir"/etc/init.d/opennhrp
install -Dm644 "$srcdir"/opennhrp.confd "$pkgdir"/etc/conf.d/opennhrp