aboutsummaryrefslogblamecommitdiffstats
path: root/community/thttpd/APKBUILD
blob: f2d91e3ce259de344a9182f3f3acaf884b413d49 (plain) (tree)
1
2
3
4
5
                                              
                                                          
              
           
        













                                                                     
                             
                           
                                    



















                                                                    
                                          
 
                    



                   

                                       




                                        
                                             













                                                      

                                                                   





                                                            

 
                                                             
                                              
                                              
                                             
                                                   
                                                       
                                                     
                                                               
                                                                                                
                                                                              
                                                                              
                                                                             
                                                                                   
                                                                                       
                                                                                     
                                                                                               
                                                                                                                                                                
                                                                                                                                              
                                                                                                                                              
                                                                                                                                             
                                                                                                                                                   
                                                                                                                                                       
                                                                                                                                                     
                                                                                                                                                               
# Contributor: z3bra <willy at mailoo dot org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=thttpd
pkgver=2.27
pkgrel=1
pkgdesc="Simple, small, portable, fast, adn 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-webgroup.patch
        forwarded-for.patch
	thttpd-makeweb-notsuid.patch
        "

_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
}

build() {
    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
}

package() {
    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

    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 -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
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
f1b86a554177a5f2a343abb4aac6fa9bc06dafd7cabdaf8329e6478bcc296f39a56d839e85ac4bf77b682e6e9cdbbe844732dfac034d0d775b65cdeaefc4349e  thttpd.conf
5b2800825583e93cf4be76e71d2840b9894c1779a810d562a0b6145cae0c7504dadfdc1e844f1611a48cca3b4518d41b47e41a68f33043d58ffde85f1e56e3f3  thttpd.logrotated
349721da9e670ca666891f98ca338ae0041c09b353fc42bdd87015803f0b668478be8e48f36d5b56b5e172d3a7b262bf4a71c9619607a068e41c2bc292bde2be  thttpd-webgroup.patch
02c079ca104f2358cd20756082657dca96f7a88cbeb611de81504f1581c5e085a7a2765ec55b6e0ae1948803afced85e8a45fc6deb2fef1ec5ba1ba96ce68b4b  forwarded-for.patch
1138a827049f73b43ce142c914fad0670bcd4577de16485ade024314c616056ab6789897663d8b6592331354d44065eae7aa712e20f5c930a80513448416fa17  thttpd-makeweb-notsuid.patch"