diff options
Diffstat (limited to 'network/hiawatha/hiawatha.SlackBuild')
-rw-r--r-- | network/hiawatha/hiawatha.SlackBuild | 77 |
1 files changed, 49 insertions, 28 deletions
diff --git a/network/hiawatha/hiawatha.SlackBuild b/network/hiawatha/hiawatha.SlackBuild index ddb7bfec9be5c..bc86bdb2dc8b3 100644 --- a/network/hiawatha/hiawatha.SlackBuild +++ b/network/hiawatha/hiawatha.SlackBuild @@ -22,7 +22,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=hiawatha -VERSION=${VERSION:-7.8.2} +VERSION=${VERSION:-8.3.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -68,26 +68,45 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Workaround, when configure is executed it spits this message: -# WARNING: `aclocal-1.10' is missing on your system. -#find . -type f -exec touch {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --build=$ARCH-slackware-linux \ - --enable-command \ - --enable-xslt \ - --enable-chroot - -make -make install DESTDIR=$PKG +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCONFIG_DIR=/etc/$PRGNAM \ + -DLOG_DIR=/var/log/$PRGNAM \ + -DPID_DIR=/var/run/$PRGNAM \ + -DWEBROOT_DIR=/srv/$PRGNAM \ + -DWORK_DIR=/var/lib/$PRGNAM \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +# Correct the userid and groupid(s) the server will change to: +sed -i 's/^#ServerId/ServerId/' $PKG/etc/$PRGNAM/$PRGNAM.conf +sed -i "s/www-data/$PRGNAM:$PRGNAM/" $PKG/etc/$PRGNAM/$PRGNAM.conf + +# Add the configuration needed by the PHP-FastCGI utility to make it +# Just Work(tm) in Slackware(r) Linux(r) :) + +mkdir -p $PKG/var/run/$PRGNAM +echo "Server = /usr/bin/php-cgi ; 1 ; /var/run/$PRGNAM/php-fcgi.sock ; php-fcgi:php-fcgi ; /etc/httpd/php.ini" >> \ + $PKG/etc/$PRGNAM/php-fcgi.conf + +sed -i "s:/var/run/php-fcgi.pid/:/var/run/$PRGNAM/php-fcgi.pid:" \ + $PKG/etc/$PRGNAM/php-fcgi.conf + +sed -i "s_ConnectTo = 127.0.0.1:2005_ConnectTo = /var/run/$PRGNAM/php-fcgi.sock_" \ + $PKG/etc/$PRGNAM/$PRGNAM.conf + +# Set the correct permissions for pid/socket directory. +chown hiawatha:php-fcgi $PKG/var/run/$PRGNAM +chmod 770 $PKG/var/run/$PRGNAM # Install init scipts mkdir -p $PKG/etc/rc.d/ @@ -100,10 +119,16 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS ChangeLog COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/extra +cp -a AUTHORS ChangeLog INSTALL LICENSE $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Add some extra scripts from upstream +for script in mkcert newroot +do + cat extra/$script > $PKG/usr/doc/$PRGNAM-$VERSION/extra/$script +done + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh @@ -115,14 +140,10 @@ do done # Add *.new files into doinst.sh -for file in $(find $PKG/etc/rc.d -type f -name "*.new") +for file in $(find $PKG/etc/rc.d $PKG/etc/$PRGNAM -type f -name "*.new") do echo preserve_perms $(echo $file | sed "s:$PKG/::") >> $PKG/install/doinst.sh done -for file in $(find $PKG/etc/$PRGNAM -type f -name "*.new") -do - echo config $(echo $file | sed "s:$PKG/::") >> $PKG/install/doinst.sh -done cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |