diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-06-24 04:43:30 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-06-24 04:43:30 +0000 |
commit | 949c163806ce692f5851d79e9d09e5a487e893cf (patch) | |
tree | b1df5f1e8f00d79b3b9102f9affc54412c0cf3f6 /net/p2p | |
parent | 2fe590f5558d330db626ef9dc1af48541fbb6f8d (diff) | |
download | slackbuilds-949c163806ce692f5851d79e9d09e5a487e893cf.tar.gz slackbuilds-949c163806ce692f5851d79e9d09e5a487e893cf.tar.bz2 |
amule: adding amule and dependency; apg: adding apg; cryptlib: adding cryptlib
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2210 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'net/p2p')
-rw-r--r-- | net/p2p/amule/Manifest | 24 | ||||
-rwxr-xr-x | net/p2p/amule/aMule.SlackBuild | 253 | ||||
-rw-r--r-- | net/p2p/amule/slack-required | 6 |
3 files changed, 207 insertions, 76 deletions
diff --git a/net/p2p/amule/Manifest b/net/p2p/amule/Manifest new file mode 100644 index 00000000..d73eddc7 --- /dev/null +++ b/net/p2p/amule/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST aMule-2.2.5.tar.bz2 4715858 MD5 d26048f8e00a1ca801b3b41156b4268d RMD160 cef2ea2248b877c75dce6a8f4c32c7585c5f64b8 SHA1 2e58fdeffe65cd036467b1c62ba95d791fba9a11 SHA256 cb2ec9885037fe114999374368b1c16038ccd8a2eeda16231eea4096a7b2befd SHA512 18509992177d805e468ee1be568a79464989862974ad800ad88927f54f140cb966c8c2254f3acf0c0cc3c55e320cd7c1d839a990ad96219885af7b34adcecd1b +MKBUILD aMule.mkbuild 5183 MD5 9587c83bdb015bd76a6cdfa377288e5c RMD160 46951b683a80200589b81693b56f56e8a800d2b5 SHA1 7d102c275b781ad89751e626e99ccea3571fd6ab SHA256 bf905df70d46c5c362159be13ea18b414b99f62b26d7a4364f47547635389c67 SHA512 e0bd2f6eb452d971a1eed0c13ca451c8e99c3be8e8434a87c803937549351efd30112055fb2cc23542c1f6b7fb962dafcb0fac5c1cb3239756097a2ebed894c8 +SLACK-REQUIRED slack-required 78 MD5 802af14459d902427492a896ba7c1ce7 RMD160 69f577778740e71c20a36ddc309f0b854a07f2f8 SHA1 ecec5edfade2be35cc00bd1c89676796e90b790c SHA256 24e35411eb040e06981f99fa1564efdf3f4430fc37eae94810375d2d49fb13d6 SHA512 b8d194b6d8e7ec6fbd38b789f8422157269cf08f19d2b4bf9472886df52c4decd659fa738b3e51a1f1ce64bd673c5182c342bf5d158754da48c4c2fb19193a25 +SLACKBUILD aMule.SlackBuild 7218 MD5 28b83def6558928422a3a8ebb9a71c05 RMD160 d8bf02031d4f8d498a63d5c93ead1af64cae334a SHA1 3877818daefc4be8ac965b7dec45b07b818875e6 SHA256 e2a6d13eec6d10aaf9c6d19d4400c5b4e5cac18dcd906840c068a1add920cf95 SHA512 819f2faa3cbc8b31ea2ec9aa373b6d5a966207ca9de1b62ae225fa57d1fe47a754d1462acd3eea29437e4d2b11c56a5125790b1984787993479b393b9211163e +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKQaQ+AAoJEEHL93ESzgei1UYP/2ena41cg7MD4bm7USJTKBFc +eCDAEMkoL7XElAkPcG+aZyv4exi/jy+Hlda7DSX+M89n2Rfx2IYLo6PYwGf1G1HF +VKCcfqnG3J2ls+08G6zUFsLa2dYJU5EywMSGK4mPOoa9miRCCkgGbTf0pwkpSYGk +3BdAS13m9rzLPQVo8I1ML5RGF4f3HA+cW5E5yNpkRTUwLUttCulYwTZ2tJOqVgLW +RMS4jNg9nTbsraDWXv7Dei5tjRQvfouixh3ETCDUB/mtlZ6NYLDhj7VCWlZT6IYr +tvdTXRz+W+rio+9nAVaPMcLu8oU7mjR/1u0aglIHdEIvhdw9h3Azyh5iOfQhtgVe +s/vzk58R5PZBf8alsstgYQ79nIdNSH/bdwNK4NPd7JCr2LowgshMhwyi5mLZDbvz +D9lvJWzdaczsR9tM8/uHsBAmh1DZkqD/iEq6xtwHFHfn3mwuu+EbL67BjHX/Vbx+ +X5eLXlj7jIyaLNywqbi91G0x5LipuIt4F/iT/PW1XnJrq3Eb+so+9QHlqB7WKDuD +Ydaur3x0fEv5kp251FjF0k54yyv/rhRKrM4VtvcnXgaJM5M8Sj80WlHZ4XFlFXBF +PnXBw2Bc09wYoN9Rer/hgQUfVihsJzw5Nu/v3y5M9YAZNGqFA2KnYCVlEtAyrqk6 +rQiCp2TdLEjotawhX+87 +=COjI +-----END PGP SIGNATURE----- diff --git a/net/p2p/amule/aMule.SlackBuild b/net/p2p/amule/aMule.SlackBuild index 139f12ac..496bf3c8 100755 --- a/net/p2p/amule/aMule.SlackBuild +++ b/net/p2p/amule/aMule.SlackBuild @@ -1,95 +1,204 @@ #!/bin/bash # -# aMule.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# aMule.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# aMule.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# aMule.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for aMule -# by rhatto at riseup.net +# slackbuild for aMule, by Silvio Rhatto +# requires: crypto++ +# tested: aMule-2.2.5 +# model: generic.mkSlackBuild $Rev: 805 $ # -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="aMule" +# Set variables +CWD="$(pwd)" +SRC_NAME="aMule" +PKG_NAME="aMule" ARCH=${ARCH:=i486} -VERSION=${VERSION:=2.1.3} +SRC_VERSION=${VERSION:=2.2.5} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +SLACKBUILD_PATH=${SLACKBUILD_PATH:="net/p2p/amule"} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --enable-amulecmd"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="bz2" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://easynews.dl.sourceforge.net/sourceforge/amule/$SRC" - -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR - -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.bz2" +URL="http://downloads.sourceforge.net/amule/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # Manifest signature checking + if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then + echo "Checking Manifest signature..." + gpg --verify $CWD/Manifest + if [ "$?" != "0" ]; then + exit $ERROR_MANIFEST + fi + fi + + MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`" + + for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do + + MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`" + MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`" + MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`" + + if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then + MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE" + else + MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`" + fi + + if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then + continue + fi + + echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..." + + SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`" + SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`" + + # Check source code size + if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then + echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC" + exit $ERROR_MANIFEST + else + echo "Size match." + fi + + # Check source code integrity + for ALGO in md5 rmd160 sha1 sha256 sha512; do + if [ $ALGO = "rmd160" ]; then + ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`" + else + ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`" + fi + ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`" + ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }') + if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then + echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC" + exit $ERROR_MANIFEST + else + echo "$ALGO match." + fi + done + + done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +else + exit $ERROR_MANIFEST fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --enable-amulecmd -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" - -cd $TMP/package-$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 +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + 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 +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| aMule: aMule (A multi-platform eMule-like ed2k client) aMule: aMule: aMule is short for "all-platform eMule-like file-sharing program", @@ -101,18 +210,14 @@ aMule: a running aMule via the network. aMule: aMule: aMule: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +# Build the package +cd "$PKG" +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG -for file in ABOUT-NLS AUTHORS COPYING Changelog Doxyfile ED2K-Links.HOWTO README; do - cp $CWD/docs/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz - -if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/net/p2p/amule/slack-required b/net/p2p/amule/slack-required index fe65c280..37cf29d1 100644 --- a/net/p2p/amule/slack-required +++ b/net/p2p/amule/slack-required @@ -1,2 +1,4 @@ -libiconv -wxWidgets +# Dependency list to aMule +# +# dependency [condition] [version]] +crypto++ |