aboutsummaryrefslogtreecommitdiffstats
path: root/community/thttpd
diff options
context:
space:
mode:
authortmpfile <tmpfile@users.noreply.github.com>2017-05-13 10:45:42 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-06 20:01:05 +0000
commit5ffcec2e52679d5d6621371bd202d4f4a36f186c (patch)
treeb17a5ae240978fd5a983d036d84322e1bfff2c94 /community/thttpd
parent43075882a85a07bbf982041df6b593ac13df6a08 (diff)
downloadaports-5ffcec2e52679d5d6621371bd202d4f4a36f186c.tar.gz
aports-5ffcec2e52679d5d6621371bd202d4f4a36f186c.tar.bz2
aports-5ffcec2e52679d5d6621371bd202d4f4a36f186c.tar.xz
community/thttpd: modernize abuild
Diffstat (limited to 'community/thttpd')
-rw-r--r--community/thttpd/APKBUILD113
1 files changed, 44 insertions, 69 deletions
diff --git a/community/thttpd/APKBUILD b/community/thttpd/APKBUILD
index f2d91e3ce2..fec4ddb691 100644
--- a/community/thttpd/APKBUILD
+++ b/community/thttpd/APKBUILD
@@ -2,99 +2,74 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=thttpd
pkgver=2.27
-pkgrel=1
-pkgdesc="Simple, small, portable, fast, adn secure HTTP server"
+pkgrel=2
+pkgdesc="Simple, small, portable, fast, and secure HTTP server"
url="http://www.acme.com/software/thttpd"
arch="all"
license="custom:BSD"
-depends=""
-depends_dev=""
-makedepends="$depends_dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc"
source="http://www.acme.com/software/$pkgname/$pkgname-$pkgver.tar.gz
- thttpd.initd
- thttpd.confd
- thttpd.conf
- thttpd.logrotated
+ thttpd.initd
+ thttpd.confd
+ thttpd.conf
+ thttpd.logrotated
thttpd-webgroup.patch
- forwarded-for.patch
+ forwarded-for.patch
thttpd-makeweb-notsuid.patch
- "
+ "
-_builddir=$srcdir/$pkgname-$pkgver
+builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- echo 'mkv video/x-matroska' >> mime_types.txt
+ default_prepare
+ cd "$builddir"
+ echo 'mkv video/x-matroska' >> mime_types.txt
}
build() {
- cd "$_builddir"
+ cd "$builddir"
- ./configure --prefix=/usr --mandir=/usr/share/man
- sed -e 's/^CFLAGS =/CFLAGS +=/' \
- -e '/^STATICFLAG =/c STATICFLAG =' \
- -i Makefile */Makefile || return 1
-
- make || return 1
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ sed -e 's/^CFLAGS =/CFLAGS +=/' \
+ -e '/^STATICFLAG =/c STATICFLAG =' \
+ -i Makefile */Makefile
+ make
}
package() {
- cd "$_builddir"
-
- mkdir -p $pkgdir/usr/share/man/man1
+ cd "$builddir"
+
+ mkdir -p $pkgdir/usr/share/man/man1
- make \
- BINDIR="$pkgdir"/usr/sbin \
- WEBDIR="$pkgdir"/var/www/http \
- MANDIR="$pkgdir"/usr/share/man \
- WEBGROUP=www-data install || return 1
+ make \
+ BINDIR="$pkgdir"/usr/sbin \
+ WEBDIR="$pkgdir"/var/www/http \
+ MANDIR="$pkgdir"/usr/share/man \
+ WEBGROUP=www-data install
- rm -rf "$pkgdir"/var/www/http/*
+ rm -rf "$pkgdir"/var/www/http/*
- install -m755 -D "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname || return 1
- install -m644 -D "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname || return 1
- install -m644 -D "$srcdir"/$pkgname.conf \
- "$pkgdir"/etc/thttpd.conf || return 1
- install -m644 -D "$srcdir"/$pkgname.logrotated \
- "$pkgdir"/etc/logrotate.d/thttpd || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/thttpd.conf
+ install -m644 -D "$srcdir"/$pkgname.logrotated \
+ "$pkgdir"/etc/logrotate.d/thttpd
- install -d "$pkgdir"/var/log/thttpd
- install -d "$pkgdir"/usr/share/licenses/"$pkgname"
- head -n 26 thttpd.c > \
- "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE || return 1
- mkdir -p "$pkgdir/usr/share/doc/$pkgname"
- cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
- To use makeweb, please set suid to makeweb binary with:
- -------------------------------------------------------
- chmod 2755 /usr/sbin/makeweb
+ install -d "$pkgdir"/var/log/thttpd
+ install -d "$pkgdir"/usr/share/licenses/"$pkgname"
+ head -n 26 thttpd.c > \
+ "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
+ mkdir -p "$pkgdir/usr/share/doc/$pkgname"
+ cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
+ To use makeweb, please set suid to makeweb binary with:
+ -------------------------------------------------------
+ chmod 2755 /usr/sbin/makeweb
EOF
}
-md5sums="02b6caea4439bea27d2f395e4197494f thttpd-2.27.tar.gz
-0e5239ab3c23753fa288d53b4eb28241 thttpd.initd
-7e53378c3ab359beee6f1b3198bdb353 thttpd.confd
-fb88ae8b618a34431ec6d3608e06cc88 thttpd.conf
-e29e38de0195bdbacec8daaa016cabfa thttpd.logrotated
-5677f99962af531b65e4f58198b84fc0 thttpd-webgroup.patch
-9976ae6a2bb06b076a100c05235a72b8 forwarded-for.patch
-a810cf21f0caf648856ed5851023e794 thttpd-makeweb-notsuid.patch"
-sha256sums="b1c4bc37ada7c39cc2bcfbf86b3bc05be91be49f8bb4f55379eaff1f66516d7a thttpd-2.27.tar.gz
-e132cbcd0f78313e4406438385143bca00ef22c164286429fd2f6613e5f1d9bf thttpd.initd
-25f55ad96c73d8c22117dd6ef331e85fed5a3ba78b4b0ec329832e82a4159e4e thttpd.confd
-51e5f3cea217be5cc36b5f5b5084e2bf4d2611f6577ca98c98ed3a69ac5bebf2 thttpd.conf
-774ac53a3ea2b9ccf08b8ce75bf0253f72e25054ed0cd0bae4e257526248376c thttpd.logrotated
-04cab749b869a38d34bafb1c638c4d57bf561e6f64dde7dd0a3da5df37ce7a5d thttpd-webgroup.patch
-eb3be98c65b8f9297867205772cd9939f526ac1c2227c24ba7e8ff754dd2216c forwarded-for.patch
-96ea2ac4d8dabb605caa22fa0591e53bbf57cead2d5311dd7c16e56b46463b8a thttpd-makeweb-notsuid.patch"
sha512sums="fe682d4b219b163712ca0d4572d31a724857f671dcd07fabb0134b86f42046f57c819e05abf7bab4b7c28afcf597375759b526aebbb9dd6765c54c0ec44f3e8b thttpd-2.27.tar.gz
bc7416986e135ade401721708060b94ce3bb885a3aa40893d68abc1b305c13609e086fbb48f8db11656902c294bf558a81814013ef3a14d73f0c5f0df0decb7d thttpd.initd
9b4309c2bc88d11ce71d40ab813e9cbe78e4ec7368e3e98f35da1d5a324ee0630a6892b43f58f84490e2b534a573673b106a9d5dd406fedefb2a4c664e455aa1 thttpd.confd