--- admin/PlamoBuild-template-20180815 2018-08-15 16:18:50.000000000 +0900 +++ plamo/05_ext/network2.txz/httpd/PlamoBuild.httpd-2.4.39 2019-06-06 09:42:06.000000000 +0900 @@ -1,19 +1,22 @@ #!/bin/sh ###################################################################### -url="" +url="http://archive.apache.org/dist/httpd/httpd-2.4.39.tar.gz" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=httpd +vers=2.4.39 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--sysconfdir=/etc/httpd --enable-layout=Slackware-FHS + --enable-mods-shared=cgi --enable-xml2enc --enable-proxy-html + --enable-mpms-shared=all" +DOCS="LICENSE README.cmake README.platforms README CHANGES VERSIONING + NOTICE ROADMAP ABOUT_APACHE INSTALL LAYOUT" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -37,6 +40,16 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + cp -p config.layout{,.orig} + sed -i "//,/<\/Layout>/s@\@$libdir@g" \ + config.layout + cp -p docs/conf/httpd.conf.in{,.orig} + sed -i '/^User/s@daemon@www@;/^Group/s@daemon@apache@' \ + docs/conf/httpd.conf.in + cp -p build/rpm/httpd.logrotate{,.orig} + sed -i -e 's@/sbin/service httpd@/usr/sbin/apachectl@' \ + -e 's@\(graceful\).*@\1@' build/rpm/httpd.logrotate for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -65,16 +78,79 @@ make install DESTDIR=$P fi done + touch $P/usr/bin/{apxs,dbmmanage} + touch $P/usr/sbin/{apachectl,envvars{-std,}} + touch $P/usr/$libdir/httpd/modules/httpd.exp + chown root.root $P/usr/bin/{apxs,dbmmanage} + chown root.root $P/usr/sbin/{apachectl,envvars{-std,}} + chown root.root $P/usr/$libdir/httpd/modules/httpd.exp + chown -R root.root $P/srv/httpd/{error,icons,cgi-bin} + chown root.root $mandir/man{1,8}/* + rm -rf $P/etc/httpd/{extra,httpd.conf} + sed -i '/LoadModule mpm_event/s/^/#/;/LoadModule mpm_prefork/s/^#//' \ + $P/etc/httpd/original/httpd.conf + for i in htdocs error icons cgi-bin ; do mv $P/srv/httpd/$i{,.new} ; done + mv $P/srv/httpd/{htdocs,error,icons,cgi-bin}.new $C + mv $C/{htdocs,error,icons,cgi-bin}.new $P/srv/httpd + install -d $P/etc/rc.d/init.d + ln -s /usr/sbin/apachectl $P/etc/rc.d/init.d + install -d $P/etc/logrotate.d + install -m 644 build/rpm/httpd.logrotate $P/etc/logrotate.d touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date -u '+%m%d0000'` {} \; compress + strip_libdir $P/usr/$libdir/httpd/modules + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/$libdir/httpd/modules setup_docdir convert_links + prune_symlink $P/etc/rc.d/init.d + cat <<- "EOF" >> $P/install/doinst.sh + + httpd_config() { + mv srv/httpd/$1.new srv/httpd/tmp + if [ -f srv/httpd/$1 ] ; then + mv srv/httpd/tmp/$1.new srv/httpd/$1.dist + else + mv srv/httpd/tmp/$1.new srv/httpd/$1 + fi + } + + if [ ! -d etc/httpd/extra ] ; then + cp -a etc/httpd/original/extra etc/httpd + fi + if [ ! -f etc/httpd/httpd.conf ] ; then + cp -p etc/httpd/original/httpd.conf etc/httpd + fi + mkdir srv/httpd/tmp + for i in htdocs error icons cgi-bin ; do httpd_config $i ; done + rmdir srv/httpd/tmp + EOF + cat <<- EOF >> $P/install/doinst.sh + #%% begin initialize $pkg + sed -i "/^#ServerName/{s/^#//;s@www\.example\.com@\`cat /etc/HOSTNAME\`@}" \\ + /etc/httpd/httpd.conf + if [ -d /etc/httpd/conf ] ; then + echo "Caution!: sysconfdir was changed to /etc/httpd" \\ + "(previously /etc/httpd/conf)" + fi + if [ -d /var/www ] ; then + echo "Caution!: datadir was changed to /srv (previously /var/www)" + fi + #%% end + EOF + TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P usr/{$libdir,include}/httpd + tar rvpf $pkg.tar -C $P {etc,srv,var/{log,run}}/httpd + tar rvpf $pkg.tar -C $P `cd $P ; find etc/rc.d/init.d | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find etc/logrotate.d | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup