From 8e546eccd47825ac4ca95dec3ab8104555bf0bf3 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sat, 17 Jan 2009 16:40:27 +0000 Subject: kino: updating to 1.3.2 and adding Manifest git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2087 370017ae-e619-0410-ac65-c121f96126d4 --- games/strategy/dopewars/Manifest | 4 ++ games/strategy/dopewars/dopewars.SlackBuild | 87 ++++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 13 deletions(-) create mode 100644 games/strategy/dopewars/Manifest (limited to 'games/strategy') diff --git a/games/strategy/dopewars/Manifest b/games/strategy/dopewars/Manifest new file mode 100644 index 00000000..ae0abc1e --- /dev/null +++ b/games/strategy/dopewars/Manifest @@ -0,0 +1,4 @@ +DIST dopewars-1.5.12.tar.gz 1419725 MD5 debf749de9053dc2fb2e74c37ae06206 RMD160 66c86bceb67657a9fb2ef7944b1a069dafab8ae0 SHA1 ad46a38e225680e591b078eeec563d47b96684bc SHA256 23059dcdea96c6072b148ee21d76237ef3535e5be90b3b2d8239d150feee0c19 SHA512 cfabaf9326c847aed6210a852ace64c697df5845a66b3179b8dc8dea7b99a11e1f91358d4ee54929a56c70d5f3a76f9f7bb4079fdef765601f165b4cd06cba5a +MISC dopewars.key 1312 MD5 6b604deb4e50516d3ba73f1e14dba0e7 RMD160 b62f962ffb5e78218b07c2e7944fa586034b0311 SHA1 31cb8f6ed3acfa7a0a7e6a98c9269080000b9bc7 SHA256 bcc13a83d7db3f746cea0ed1df987f61e95bd0ae27dead43846121fc5a9b3bf3 SHA512 82d9169508a03ab509743257590e4b79616a33d93a52466eb4a26cd80a4e9ea903dfe3cc51f23875be21cee6f9d315442ff4c3906a1a31c63a2560f1fa17efc8 +MKBUILD dopewars.mkbuild 3025 MD5 5fe6cefd1c221873d09b27641762813b RMD160 981cd3403ccbafb03b5678451b54ba79a374c6c2 SHA1 ae744934512e052de7f61d3d3f95debc6597661d SHA256 34201832c2192c84af072dd87933c862992eab77d7c6dc3f2383cae002758100 SHA512 8bb314185f51a59b58918024589bf44e917836231f8bb567303690e77a709d06dfbd93403b8d2a7d6799d2abf483e6a6b68cbd42f09262a59dcd5173d36c3a81 +SLACKBUILD dopewars.SlackBuild 8310 MD5 f1fefdadb9342c6feefac408b60e70ed RMD160 e71221109da4bacfc832fae31501939950cb9dea SHA1 d72e2663605b1aff69fad81a032f57afe3135153 SHA256 7443d8f331ffa3abd65845c1d6ac5cbebb5e21d01d95b22270395ab80f3ba80a SHA512 eed4236df297a3e5fa67e833771d719034ac5a0ac463e3d087b3a8c8d68bc677ef2d38b325940fb7f46d1410020601adb3c90131508d4ec93edab75a1d2c63ef diff --git a/games/strategy/dopewars/dopewars.SlackBuild b/games/strategy/dopewars/dopewars.SlackBuild index 07f07792..6e246aa2 100755 --- a/games/strategy/dopewars/dopewars.SlackBuild +++ b/games/strategy/dopewars/dopewars.SlackBuild @@ -10,9 +10,9 @@ # 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 for dopewars, by Silvio Rhatto # requires: @@ -47,16 +47,17 @@ NUMJOBS=${NUMJOBS:=""} LIBDIR="$PREFIX/lib" if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mcpu=i686" + 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" + SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -64,6 +65,7 @@ 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 @@ -86,6 +88,8 @@ fi # Import minimized signing key from if echo [[SIGNING KEY URL]] | grep -q -v "SIGNING KEY URL"; then lynx -dump [[SIGNING KEY URL]] | gpg --import || exit $ERROR_GPG +elif echo [[SIGNING KEY ID]] | grep -q -v "SIGNING KEY ID"; then + gpg --recv-keys [[SIGNING KEY ID]] || exit $ERROR_GPG else gpg --import << EOKEY || exit $ERROR_GPG `cat dopewars.key` @@ -99,9 +103,9 @@ if echo http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg | g wget "http://downloads.sourceforge.net/dopewars/dopewars-1.5.12.tar.gz.gpg" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET fi else - if [ -f "$SRC_DIR/$SRC.sig" ]; then + if [ -s "$SRC_DIR/$SRC.sig" ]; then SIGNATURE="$SRC.sig" - elif [ -f "$SRC_DIR/$SRC.asc" ]; then + elif [ -s "$SRC_DIR/$SRC.asc" ]; then SIGNATURE="$SRC.asc" else echo Trying to get signature file from $URL.sig... @@ -125,10 +129,67 @@ echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE... gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG echo Success. +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + 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 + +else + exit $ERROR_MANIFEST +fi + # 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 $8 }'`" +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Configure @@ -152,7 +213,7 @@ make install DESTDIR="$PKG" || exit $ERROR_INSTALL ) # Install documentation -DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING readme.*" +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 @@ -164,9 +225,9 @@ done 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 ':'. @@ -189,6 +250,6 @@ cd "$PKG" makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi -- cgit v1.2.3