#!/bin/bash # # d4x.SlackBuild # code: Michal Marciszczuk set -e # PACKAGE GENERAL INFO [ EDIT] PKGNAME=d4x VERSION=2.5.7.1 BUILD=1X ARCH=i686 URL=http://d4x.krasu.ru/files/d4x-$VERSION.tar.bz2 CWD=`pwd` TMP=/tmp/$PKGNAME rm -rf $TMP mkdir -p $TMP $TMP/package $TMP/package/install # PACKAGE DESCRIPTION [ EDIT] cat << SLACKDESC > $TMP/package/install/slack-desc |-----handy-ruler------------------------------------------------------| $PKGNAME: d4x ( Downloader for X ) $PKGNAME: $PKGNAME: Downloader for X is a userfriendly program with nice X interface $PKGNAME: to download files from the Internet. $PKGNAME: $PKGNAME: $PKGNAME: $PKGNAME: $PKGNAME: Package prepared by: Zielony ( e-pl@o2.pl ) $PKGNAME: SLACKDESC # step 1 : DOWNLOAD SOURCE wget -c $URL -P $CWD # step 2 : UNPACK SOURCE AND COMPILE tar jxvf $CWD/$PKGNAME-$VERSION.tar.bz2 -C $TMP chown root:root $TMP -R cd $TMP/$PKGNAME-$VERSION CFLAGS=${CFLAGS:--O2 -march=i686 -mcpu=i686} ./configure \ --prefix=/usr \ --without-boost \ --disable-glibtest \ --disable-gtktest \ --with-boost-includedir=/usr/include/boost-1_33_1 \ --disable-debug \ --mandir=/usr/man \ --sysconfdir=/etc make make install DESTDIR=$TMP/package # step 3 : STRIP BINARIES && GZIP MANUALS cd $TMP/package find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null# gzip $TMP/package/usr/man/man?/* # step 4 : CREATE PACKAGE && CLEAN TMP cd $TMP/package makepkg -l y -c n $CWD/$PKGNAME-$VERSION-$ARCH-$BUILD.tgz rm -rf $TMP