tweaking/fixing/refactoring

This commit is contained in:
Gwenhael Le Moine 2021-07-11 12:06:51 +02:00
parent f72d8225c0
commit d015eab34a
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -84,18 +84,17 @@ rm -rf $PKGNAM
[ ! -e $REPOSITORY ] && git clone git://git.savannah.gnu.org/emacs.git $REPOSITORY [ ! -e $REPOSITORY ] && git clone git://git.savannah.gnu.org/emacs.git $REPOSITORY
( cd $REPOSITORY cd $REPOSITORY
git checkout $BRANCH git checkout $BRANCH
git pull git pull --all
[ -e Makefile ] && make distclean [ "x$VERSION" == "xtrunk" ] || git checkout $VERSION
) [ -e Makefile ] && make distclean
./autogen.sh
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" [ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)"
mkdir -p $TMP/$PKGNAM mkdir -p $TMP/$PKGNAM
SRCDIR=$REPOSITORY cd $TMP/$PKGNAM || exit 1
cd $PKGNAM || exit 1
[ "x$VERSION" == "xtrunk" ] || git checkout $VERSION
# tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1 # tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
# cd $PKGNAM-$SRCDIRVER || exit 1 # cd $PKGNAM-$SRCDIRVER || exit 1
@ -107,11 +106,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+ -exec chmod 644 {} \+
#autoreconf -vif SRCDIR=$REPOSITORY
(cd $SRCDIR
./autogen.sh
)
EMACS_VERSION=$(grep "AC_INIT(GNU Emacs," $SRCDIR/configure.ac | cut -d, -f 2 | tr -d \ ) EMACS_VERSION=$(grep "AC_INIT(GNU Emacs," $SRCDIR/configure.ac | cut -d, -f 2 | tr -d \ )
CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \
@ -150,10 +145,8 @@ $SRCDIR/configure \
make $NUMJOBS || make || exit 1 make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1 make install DESTDIR=$PKG || exit 1
( cd $PKG/usr/bin rm $PKG/usr/bin/emacs
rm emacs mv $PKG/usr/bin/emacs-${EMACS_VERSION} $PKG/usr/bin/emacs-${EMACS_VERSION}-with-x11
mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11
)
# Also add a version of the binary that is not linked to X11: # Also add a version of the binary that is not linked to X11:
# cd $TMP # cd $TMP
@ -218,15 +211,14 @@ fi
find $PKG | xargs file | grep -e "executable" -e "shared object" \ find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find $PKG/usr/man/ -type f -exec gzip -9 {} \+
( cd $PKG/usr/man ( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \+
for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
) )
( cd $PKG/usr/info rm -f $PKG/usr/info/dir
rm -f dir gzip -9 $PKG/usr/info/*
gzip -9 *
)
mkdir -p $PKG/usr/doc/$PKGNAM-$EMACS_VERSION mkdir -p $PKG/usr/doc/$PKGNAM-$EMACS_VERSION
cp -a \ cp -a \