properly identify binary repacking packages
This commit is contained in:
parent
db4a4b1b84
commit
709cd11377
3 changed files with 14 additions and 14 deletions
|
@ -15,19 +15,19 @@ REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
|
||||||
|
|
||||||
mkdir -p $REPOSITORY
|
mkdir -p $REPOSITORY
|
||||||
|
|
||||||
[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz http://download.calibre-ebook.com/${VERSION}/${PRGNAM}-${VERSION}-${ARCH}.txz
|
[ ! -e $REPOSITORY/calibre-${VERSION}-${ARCH}.txz ] && wget -c -O $REPOSITORY/calibre-${VERSION}-${ARCH}.txz http://download.calibre-ebook.com/${VERSION}/calibre-${VERSION}-${ARCH}.txz
|
||||||
|
|
||||||
rm -fr $PKG
|
rm -fr $PKG
|
||||||
mkdir -p $PKG/opt/${PRGNAM}
|
mkdir -p $PKG/opt/calibre
|
||||||
|
|
||||||
tar xvf $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz -C $PKG/opt/${PRGNAM}
|
tar xvf $REPOSITORY/calibre-${VERSION}-${ARCH}.txz -C $PKG/opt/calibre
|
||||||
|
|
||||||
mkdir -p $PKG/usr/bin
|
mkdir -p $PKG/usr/bin
|
||||||
|
|
||||||
$PKG/opt/calibre/calibre_postinstall --root=$PKG/usr
|
$PKG/opt/calibre/calibre_postinstall --root=$PKG/usr
|
||||||
|
|
||||||
mkdir -p $PKG/etc/rc.d/
|
mkdir -p $PKG/etc/rc.d/
|
||||||
cp $REPOSITORY/rc.calibre-server $PKG/etc/rc.d/rc.calibre-server.new
|
cp $CWD/rc.calibre-server $PKG/etc/rc.d/rc.calibre-server.new
|
||||||
|
|
||||||
cd $PKG/usr/bin
|
cd $PKG/usr/bin
|
||||||
find . -type l -exec sh -c 'rm "$1"; ln -s ../../opt/calibre/$(basename $1)' _ {} \;
|
find . -type l -exec sh -c 'rm "$1"; ln -s ../../opt/calibre/$(basename $1)' _ {} \;
|
|
@ -30,7 +30,7 @@ PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
PRGNAM=$(basename $CWD)
|
PRGNAM=$(basename $CWD)
|
||||||
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${PRGNAM}/${PRGNAM}/releases/latest | grep tag_name | grep -o "[0-9.]*")}
|
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/dbeaver/dbeaver/releases/latest | grep tag_name | grep -o "[0-9.]*")}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-gwh}
|
TAG=${TAG:-gwh}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ set -e
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
|
|
||||||
SRCNAM=${PRGNAM}-ce
|
SRCNAM=dbeaver-ce
|
||||||
SRCVER=$VERSION-linux.gtk.$SRCARCH
|
SRCVER=$VERSION-linux.gtk.$SRCARCH
|
||||||
DESTDIR=$PKG/opt/
|
DESTDIR=$PKG/opt/
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
|
||||||
mkdir -p $REPOSITORY
|
mkdir -p $REPOSITORY
|
||||||
|
|
||||||
# mise en place
|
# mise en place
|
||||||
[ ! -e $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz ] && wget -c -O $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz https://github.com/${PRGNAM}/${PRGNAM}/releases/download/${VERSION}/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz
|
[ ! -e $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz ] && wget -c -O $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz https://github.com/dbeaver/dbeaver/releases/download/${VERSION}/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz
|
||||||
|
|
||||||
mkdir -p $DESTDIR
|
mkdir -p $DESTDIR
|
||||||
cd $DESTDIR
|
cd $DESTDIR
|
||||||
|
@ -66,23 +66,23 @@ find -L . \
|
||||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
chmod ga+x $DESTDIR/$PRGNAM/$PRGNAM
|
chmod ga+x $DESTDIR/dbeaver/dbeaver
|
||||||
|
|
||||||
mkdir -p $PKG/usr/bin
|
mkdir -p $PKG/usr/bin
|
||||||
cat << EOF > $PKG/usr/bin/$PRGNAM
|
cat << EOF > $PKG/usr/bin/dbeaver
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd \$HOME
|
cd \$HOME
|
||||||
/opt/$PRGNAM/$PRGNAM \$@
|
/opt/dbeaver/dbeaver \$@
|
||||||
EOF
|
EOF
|
||||||
chmod 0755 $PKG/usr/bin/$PRGNAM
|
chmod 0755 $PKG/usr/bin/dbeaver
|
||||||
|
|
||||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/dbeaver
|
||||||
cp -a \
|
cp -a \
|
||||||
$DESTDIR/$PRGNAM/readme.txt $DESTDIR/$PRGNAM/licenses/* \
|
$DESTDIR/dbeaver/readme.txt $DESTDIR/dbeaver/licenses/* \
|
||||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
$PKG/usr/doc/dbeaver
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat <<EOF > $PKG/install/slack-desc
|
cat <<EOF > $PKG/install/slack-desc
|
Loading…
Reference in a new issue