[PKGBUILD] Switch from md5 to sha512 checksum, code cleanup

Remove comment out line of code

Replace tabs with spaces (yes I’m this kind of guy)
Fix indentation
This commit is contained in:
Lucien Cartier-Tilet 2021-11-25 00:53:56 +01:00
parent afa83c5e05
commit 81c9cdab7e
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
5 changed files with 73 additions and 79 deletions

View File

@ -23,7 +23,6 @@ sha512sums=('27b0a56c95efe99c2b3cadb10c4e70186591bef0793d58b1acff99f8dfc789806ae
noextract=() noextract=()
package() { package() {
# unzip "${srcdir}/${pkgname}-${pkgver}-Linux64.zip" -d "${srcdir}/${pkgname}/"
mkdir -p "${pkgdir}/usr/share/applications/" mkdir -p "${pkgdir}/usr/share/applications/"
install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/" install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/"
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}" mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"

View File

@ -55,9 +55,9 @@ NOGZ= # Don't compress .el files.
################################################################################ ################################################################################
if [[ $CLI == "YES" ]] ; then if [[ $CLI == "YES" ]] ; then
pkgname="emacs-nox-phundrak-git" pkgname="emacs-nox-phundrak-git"
else else
pkgname="emacs-phundrak-git" pkgname="emacs-phundrak-git"
fi fi
pkgver=28.0.60.150971 pkgver=28.0.60.150971
pkgrel=1 pkgrel=1
@ -75,8 +75,8 @@ replaces=('emacs' 'emacs26-git' 'emacs27-git' 'emacs28-git' 'emacs-seq' 'emacs-n
# If Savannah fails for reasons, use Github's mirror # If Savannah fails for reasons, use Github's mirror
source=("emacs-git::git://github.com/emacs-mirror/emacs.git#branch=emacs-28" source=("emacs-git::git://github.com/emacs-mirror/emacs.git#branch=emacs-28"
"https://raw.githubusercontent.com/TheVaffel/emacs/master/emacs_background_transparency.patch") "https://raw.githubusercontent.com/TheVaffel/emacs/master/emacs_background_transparency.patch")
md5sums=('SKIP' sha512sums=('SKIP'
'4a48652df63bbd4039d164e843323f27') 'd45043e6925358a41fbe42457de3233cd346a7e6133704426240a0c987587328ae08719413188b11db498f27794ee55662c20e8c4b58311bb806ad71e4798574')
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug) OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
################################################################################ ################################################################################
@ -110,11 +110,11 @@ fi
if [[ $LTO == "YES" ]]; then if [[ $LTO == "YES" ]]; then
if [[ $CLANG != "YES" ]]; then if [[ $CLANG != "YES" ]]; then
CFLAGS+=" -flto -fuse-linker-plugin" CFLAGS+=" -flto -fuse-linker-plugin"
CXXFLAGS+=" -flto -fuse-linker-plugin" CXXFLAGS+=" -flto -fuse-linker-plugin"
else else
CFLAGS+=" -flto" CFLAGS+=" -flto"
CXXFLAGS+=" -flto" CXXFLAGS+=" -flto"
fi fi
fi fi
@ -177,9 +177,9 @@ pkgver() {
cd "$srcdir/emacs-git" cd "$srcdir/emacs-git"
printf "%s.%s" \ printf "%s.%s" \
"$(grep AC_INIT configure.ac | \ "$(grep AC_INIT configure.ac | \
sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\?\).\+$/\1/')" \ sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\?\).\+$/\1/')" \
"$(git rev-list --count HEAD)" "$(git rev-list --count HEAD)"
} }
# There is no need to run autogen.sh after first checkout. # There is no need to run autogen.sh after first checkout.
@ -211,66 +211,66 @@ build() {
--with-sound=alsa --with-sound=alsa
--with-modules --with-modules
--with-json --with-json
# Beware https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25228 # Beware https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25228
# dconf and gconf break font settings you set in ~/.emacs. # dconf and gconf break font settings you set in ~/.emacs.
# If you insist you'll need to read that bug report in *full*. # If you insist you'll need to read that bug report in *full*.
# Good luck! # Good luck!
--without-gconf --without-gconf
--without-gsettings --without-gsettings
) )
################################################################################ ################################################################################
################################################################################ ################################################################################
if [[ $CLANG == "YES" ]]; then if [[ $CLANG == "YES" ]]; then
_conf+=( '--enable-autodepend' ); _conf+=( '--enable-autodepend' );
fi fi
if [[ $LTO == "YES" ]]; then if [[ $LTO == "YES" ]]; then
_conf+=( '--enable-link-time-optimization' ); _conf+=( '--enable-link-time-optimization' );
fi fi
if [[ $JIT == "YES" ]]; then if [[ $JIT == "YES" ]]; then
_conf+=( '--with-native-compilation' ); _conf+=( '--with-native-compilation' );
fi fi
if [[ $CLI == "YES" ]]; then if [[ $CLI == "YES" ]]; then
_conf+=( '--without-x' '--with-x-toolkit=no' '--without-xft' '--without-lcms2' '--without-rsvg' '--without-jpeg' '--without-gif' '--without-tiff' '--without-png' ); _conf+=( '--without-x' '--with-x-toolkit=no' '--without-xft' '--without-lcms2' '--without-rsvg' '--without-jpeg' '--without-gif' '--without-tiff' '--without-png' );
elif [[ $NOTKIT == "YES" ]]; then elif [[ $NOTKIT == "YES" ]]; then
_conf+=( '--with-x-toolkit=no' '--without-toolkit-scroll-bars' '--with-xft' '--without-xaw3d' ); _conf+=( '--with-x-toolkit=no' '--without-toolkit-scroll-bars' '--with-xft' '--without-xaw3d' );
elif [[ $LUCID == "YES" ]]; then elif [[ $LUCID == "YES" ]]; then
_conf+=( '--with-x-toolkit=lucid' '--with-xft' '--with-xaw3d' ); _conf+=( '--with-x-toolkit=lucid' '--with-xft' '--with-xaw3d' );
elif [[ $GTK2 == "YES" ]]; then elif [[ $GTK2 == "YES" ]]; then
_conf+=( '--with-x-toolkit=gtk2' '--without-gsettings' '--without-xaw3d' ); _conf+=( '--with-x-toolkit=gtk2' '--without-gsettings' '--without-xaw3d' );
else else
_conf+=( '--with-x-toolkit=gtk3' '--without-xaw3d' ); _conf+=( '--with-x-toolkit=gtk3' '--without-xaw3d' );
fi fi
if [[ $MAGICK == "YES" ]]; then if [[ $MAGICK == "YES" ]]; then
_conf+=( '--with-imagemagick'); _conf+=( '--with-imagemagick');
else else
_conf+=(); _conf+=();
fi fi
if [[ $NOCAIRO == "YES" || $CLI == "YES" ]]; then if [[ $NOCAIRO == "YES" || $CLI == "YES" ]]; then
_conf+=( '--without-cairo' ); _conf+=( '--without-cairo' );
fi fi
if [[ $XWIDGETS == "YES" ]]; then if [[ $XWIDGETS == "YES" ]]; then
_conf+=( '--with-xwidgets' ); _conf+=( '--with-xwidgets' );
fi fi
if [[ $NOGZ == "YES" ]]; then if [[ $NOGZ == "YES" ]]; then
_conf+=( '--without-compress-install' ); _conf+=( '--without-compress-install' );
fi fi
# ctags/etags may be provided by other packages, e.g, universal-ctags # ctags/etags may be provided by other packages, e.g, universal-ctags
_conf+=('--program-transform-name=s/\([ec]tags\)/\1.emacs/') _conf+=('--program-transform-name=s/\([ec]tags\)/\1.emacs/')
################################################################################ ################################################################################
################################################################################ ################################################################################
./configure "${_conf[@]}" ./configure "${_conf[@]}"

View File

@ -10,14 +10,14 @@ depends=()
makedepends=('rustup' 'git') makedepends=('rustup' 'git')
options=('strip' 'zipman') options=('strip' 'zipman')
source=("$pkgname::git+https://labs.phundrak.com/phundrak/pumopm.git#branch=develop") source=("$pkgname::git+https://labs.phundrak.com/phundrak/pumopm.git#branch=develop")
md5sums=('SKIP') sha512sums=('SKIP')
conflicts=('pumopm' 'pumopm-bin') conflicts=('pumopm' 'pumopm-bin')
# If Phundraks Gitea takes too long to answer, or if it is down, use the # If Phundraks Gitea takes too long to answer, or if it is down, use the
# Github mirror # Github mirror
# source=("$pkgname}::git+https://github.com/Phundrak/pumopm.git#branch=develop") # source=("$pkgname}::git+https://github.com/Phundrak/pumopm.git#branch=develop")
pkgver() { pkgver() {
cd "$pkgname" cd "$pkgname"
git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
} }

View File

@ -14,29 +14,27 @@ makedepends=('git')
conflicts=('sent' 'sent-git') conflicts=('sent' 'sent-git')
source=("$pkgname::git+https://labs.phundrak.com/phundrak/sent") source=("$pkgname::git+https://labs.phundrak.com/phundrak/sent")
sha256sums=('SKIP') sha256sums=('SKIP')
# "config.h")
# 'SKIP')
pkgver() { pkgver() {
cd "${pkgname}" cd "${pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
} }
prepare() { prepare() {
cd "${srcdir}/${pkgname}" cd "${srcdir}/${pkgname}"
if [ -f "${srcdir}/config.h" ]; then if [ -f "${srcdir}/config.h" ]; then
cp "${srcdir}/config.h" . cp "${srcdir}/config.h" .
fi fi
} }
build() { build() {
make -C "${srcdir}/${pkgname}" make -C "${srcdir}/${pkgname}"
} }
package() { package() {
cd "${srcdir}/${pkgname}" cd "${srcdir}/${pkgname}"
make PREFIX="/usr" \ make PREFIX="/usr" \
DESTDIR="${pkgdir}" \ DESTDIR="${pkgdir}" \
install install
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
} }

View File

@ -16,8 +16,8 @@ makedepends=('git')
provides=("${_name}") provides=("${_name}")
conflicts=("${_name}" "${_name}-git") conflicts=("${_name}" "${_name}-git")
source=("${_name}::git+${url}.git" config.h) source=("${_name}::git+${url}.git" config.h)
md5sums=('SKIP' sha512sums=('SKIP'
'0a944f532b962cac835ee65d616be61b') 'f3cd5532977033ffb878e397c76b4576f931b74dc2c158f373d6618d0d4155387bc983b745f0adeffeee85de9ebdc9e9418d823cceef8895b2d8e6ab1d4791ca')
pkgver() { pkgver() {
@ -26,10 +26,7 @@ pkgver() {
} }
prepare() { prepare() {
# echo =====================
# echo srcdir $srcdir
cd "${srcdir}/${_name}" cd "${srcdir}/${_name}"
# use your customisations if present
[[ -f $srcdir/config.h ]] && cp $srcdir/config.h . [[ -f $srcdir/config.h ]] && cp $srcdir/config.h .
# Allow custom FLAGS # Allow custom FLAGS