From 0c1386bb05c50e53c1294ba1c951d3675eab35ff Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 10:55:11 +0200 Subject: [PATCH 1/9] extract version number from sources Signed-off-by: Gwenhael Le Moine --- e/emacs/emacs.SlackBuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e/emacs/emacs.SlackBuild b/e/emacs/emacs.SlackBuild index 388099f8..1b14f13e 100755 --- a/e/emacs/emacs.SlackBuild +++ b/e/emacs/emacs.SlackBuild @@ -31,7 +31,7 @@ ONLY_X11=${ONLY_X11:=YES} PRGNAM=emacs BRANCH=${BRANCH:=trunk} -VERSION=${VERSION:-${BRANCH}_$(date +"%Y.%m.%d_%H.%M")} +VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")} ARCH=${ARCH:-$(uname -m)} NUMJOBS=${NUMJOBS:-" -j3 "} BUILD=${BUILD:-1} @@ -88,6 +88,8 @@ find . \ ./autogen.sh ) +EMACS_VERSION=$(grep "AC_INIT(GNU Emacs," $SRCDIR/configure.ac | sed 's|AC_INIT(GNU Emacs, \([0-9.]*\), bug-gnu-emacs@gnu.org)|\1|') + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ $SRCDIR/configure \ @@ -228,4 +230,4 @@ Categories=Application;Development; EOF cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$EMACS_VERSION_$VERSION-$ARCH-$BUILD$TAG.txz From 1f3f7abc4953579da71a1f63ba65a0cd8be7a657 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 11:49:37 +0200 Subject: [PATCH 2/9] extract EMACS_VERSION once --- e/emacs/emacs.SlackBuild | 1 - 1 file changed, 1 deletion(-) diff --git a/e/emacs/emacs.SlackBuild b/e/emacs/emacs.SlackBuild index 1b14f13e..151bf404 100755 --- a/e/emacs/emacs.SlackBuild +++ b/e/emacs/emacs.SlackBuild @@ -112,7 +112,6 @@ make bootstrap make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -EMACS_VERSION=$(echo "$(basename $(ls $PKG/usr/bin/emacs-2*))" | grep -o "[0-9\.]*") ( cd $PKG/usr/bin rm emacs mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11 From 52b1971838cec44a2f7b55c07b854d9a1b58a518 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 11:49:45 +0200 Subject: [PATCH 3/9] update doc files --- e/emacs/emacs.SlackBuild | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/e/emacs/emacs.SlackBuild b/e/emacs/emacs.SlackBuild index 151bf404..3176a03e 100755 --- a/e/emacs/emacs.SlackBuild +++ b/e/emacs/emacs.SlackBuild @@ -181,9 +181,14 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \ rm $PKG/usr/info/dir* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING* ChangeLog INSTALL README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a BUGS \ + CONTRIBUTE \ + COPYING \ + ChangeLog \ + INSTALL \ + INSTALL.REPO \ + README \ + $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install cat < $PKG/install/slack-desc From 758a2176c9a4bd6565a61791f705140904b6e33a Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 11:49:57 +0200 Subject: [PATCH 4/9] {} around variable name --- d/rust/rust.SlackBuild | 2 +- e/emacs/emacs.SlackBuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d/rust/rust.SlackBuild b/d/rust/rust.SlackBuild index 9deed86e..a7f43de1 100755 --- a/d/rust/rust.SlackBuild +++ b/d/rust/rust.SlackBuild @@ -31,7 +31,7 @@ tar xvf $CWD/rust-${VERSION}-x86_64-unknown-linux-gnu.tar.gz cd rust-nightly-x86_64-unknown-linux-gnu ./install.sh --prefix=$PKG/usr -echo "${ARCH}" | grep -q -o 64 && mv $PKG/usr/lib $PKG/usr/lib64 +#echo "${ARCH}" | grep -q -o 64 && mv $PKG/usr/lib $PKG/usr/lib64 mv $PKG/usr/share/man $PKG/usr/ find $PKG/usr/man/ -type f -name \*.\? -exec gzip -9 {} \; diff --git a/e/emacs/emacs.SlackBuild b/e/emacs/emacs.SlackBuild index 3176a03e..7b8c9719 100755 --- a/e/emacs/emacs.SlackBuild +++ b/e/emacs/emacs.SlackBuild @@ -234,4 +234,4 @@ Categories=Application;Development; EOF cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$EMACS_VERSION_$VERSION-$ARCH-$BUILD$TAG.txz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${EMACS_VERSION}_$VERSION-$ARCH-$BUILD$TAG.txz From 3518dddc38dd5f95169533ef36336dbc75b16b5e Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 12:23:08 +0200 Subject: [PATCH 5/9] revamp package VERSION --- xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild index f698590b..21412369 100755 --- a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild +++ b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild @@ -22,6 +22,7 @@ ARCH=${ARCH:-$(uname -m)} BUILD=1 BRANCH=${BRANCH:=latest-mozilla-central} +TIMESTAMP=$(date +%F | tr - .) if [ $KEEP_TAR == "YES" ]; then [ -e firefox-*.en-US.linux-x86_64.tar.bz2 ] && for f in firefox-*.en-US.linux-x86_64.tar.bz2 ; do mv $f $f.orig ; done @@ -96,7 +97,7 @@ mozilla-firefox: mozilla-firefox: EOF -VERSION=$(echo $BRANCH | sed 's|latest-mozilla-||g')_${VERSION} +#VERSION=$(echo $BRANCH | sed 's|latest-mozilla-||g')_${VERSION} cd $PKG -makepkg -l y -c n $OUTPUT/mozilla-firefox-$VERSION-$ARCH-$BUILD$TAG.txz +makepkg -l y -c n $OUTPUT/mozilla-firefox-${VERSION}_$TIMESTAMP-$ARCH-$BUILD$TAG.txz From 0cd1ce5657394320502441b80857f54cf97b360b Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 12:34:38 +0200 Subject: [PATCH 6/9] stop if cannot get file --- xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild index 21412369..418f4939 100755 --- a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild +++ b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild @@ -30,13 +30,12 @@ else [ -e firefox-*.en-US.linux-x86_64.tar.bz2 ] && rm firefox-*.en-US.linux-x86_64.tar.bz2 fi WHICH_TAR=$(lftp http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/$BRANCH/ -e "cls --date *.en-US.linux-x86_64.tar.bz2 ; quit" | awk '{print $4}' | sort | tail -n1) -wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/$BRANCH/$WHICH_TAR +wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/$BRANCH/$WHICH_TAR || exit -1 VERSION=$(ls -ut firefox-*.tar.bz2 | head -n1 | cut -d - -f 2 | sed 's|.en||') LIBSUFFIX=$(echo "$ARCH" | grep -o "64") - mkdir -p $TMP rm -rf $PKG From 5e7ce6cd5585071bbb8845e12260743563cf3f30 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 12:35:07 +0200 Subject: [PATCH 7/9] fix plugin path --- xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild index 418f4939..b6d7d5ea 100755 --- a/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild +++ b/xap/mozilla-firefox-nightly/mozilla-firefox.SlackBuild @@ -49,6 +49,13 @@ mkdir -p $PKG/usr/lib$LIBSUFFIX rm -f defaults/pref/firefox.js.orig ln -s ../mozilla/plugins ) || exit 1 +if [ ! "/usr/lib$LIBSUFFIX" == "/usr/lib" ]; then + mkdir -p $PKG/usr/lib + ( cd $PKG/usr/lib + ln -s ../lib$LIBSUFFIX/mozilla mozilla + ) +fi + mkdir -p $PKG/usr/bin ( cd $PKG/usr/bin ln -sf /usr/lib$LIBSUFFIX/firefox-$VERSION/firefox . From b6528789f5e75fa04b6b0a762357aaaee48d0b77 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 16:48:51 +0200 Subject: [PATCH 8/9] Add calibre SlackBuild that packages the binaries available on calibre-ebook.com --- xap/calibre/calibre.SlackBuild | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 xap/calibre/calibre.SlackBuild diff --git a/xap/calibre/calibre.SlackBuild b/xap/calibre/calibre.SlackBuild new file mode 100755 index 00000000..1a6f81d6 --- /dev/null +++ b/xap/calibre/calibre.SlackBuild @@ -0,0 +1,52 @@ +#!/bin/sh -x + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=2.22.0 +ARCH=$(uname -m) +BUILD=${BUILD:-1} +TAG=${TAG:-cyco} +TMP=${TMP:-/tmp/$TAG} +PKG=$TMP/pkg-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +[ ! -e $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz http://download.calibre-ebook.com/${VERSION}/${PRGNAM}-${VERSION}-${ARCH}.txz + +rm -fr $PKG +mkdir -p $PKG/opt/${PRGNAM} + +tar xvf $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz -C $PKG/opt/${PRGNAM} + +mkdir -p $PKG/usr/bin + +$PKG/opt/calibre/calibre_postinstall --root=$PKG/usr + +cd $PKG/usr/bin +find . -type l -exec sh -c 'rm "$1"; ln -s ../../opt/calibre/$(basename $1)' _ {} \; + +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +# HOW TO EDIT THIS FILE: +# 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 +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +${PRGNAM}: ${PRGNAM} (e-book library management application) +${PRGNAM}: +${PRGNAM}: ${PRGNAM} is meant to be a complete e-library solution. +${PRGNAM}: It includes library management, format conversion, news feeds to ebook +${PRGNAM}: conversion as well as e-book reader sync features. ${PRGNAM} is +${PRGNAM}: primarily a ebook cataloging program. It manages your ebook collection +${PRGNAM}: for you. It is designed around the concept of the logical book, i.e. +${PRGNAM}: a single entry in the database that may correspond to ebooks in +${PRGNAM}: several formats. It also supports conversion to and from a dozen +${PRGNAM}: different ebook formats. +${PRGNAM}: ${PRGNAM} home: http://calibre-ebook.com/ +EOF + +cd $PKG +/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz From d28f317138d87ce8ea70e6cee7053f22a83f2e64 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 1 Apr 2015 16:48:58 +0200 Subject: [PATCH 9/9] ignore *.txz --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 72deeac8..0ad887b0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ repositories/ *.deb *.zip *.tgz +*.txz *.tar *.pdf *.ttf