summaryrefslogtreecommitdiffstats
path: root/main/opennhrp/APKBUILD
diff options
context:
space:
mode:
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