diff --git a/PKGBUILD b/PKGBUILD index 9524487..4fbaddc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,19 +1,19 @@ # Maintainer: Daenyth # Contributor: Daenyth pkgname=pkgtools -pkgver=24 +pkgver=25 pkgrel=1 pkgdesc="A collection of scripts for Arch Linux packages" arch=('any') url="https://bbs.archlinux.org/viewtopic.php?pid=384196" license=('GPL') -depends=('bash>=4' 'pcre' 'libarchive' 'python' 'namcap' 'pkgfile') +depends=('bash>=4' 'pcre' 'libarchive' 'python' 'namcap' 'pkgfile' 'gem2arch') optdepends=('abs: Provides PKGBUILD prototypes for newpkg') provides=('newpkg') backup=('etc/pkgtools/newpkg.conf' 'etc/pkgtools/pkgfile.conf' 'etc/pkgtools/spec2arch.conf') install=pkgtools.install source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/Daenyth/pkgtools/tarball/v$pkgver") -md5sums=('f139c3940e1038cac4e29e985089e8a8') +md5sums=('9e9d7aad5ba8ecee1b798c3ed4e0a0a7') package() { cd "Daenyth-$pkgname"-* diff --git a/PKGBUILD-git b/PKGBUILD-git index cd17d62..e217ac2 100644 --- a/PKGBUILD-git +++ b/PKGBUILD-git @@ -7,7 +7,7 @@ pkgdesc="A collection of scripts for Arch Linux packages" arch=('any') url="https://github.com/Daenyth/pkgtools" license=('GPL') -depends=('bash>=4' 'libarchive' 'pcre' 'python' 'namcap' 'pkgfile') +depends=('bash>=4' 'libarchive' 'pcre' 'python' 'namcap' 'pkgfile' 'gem2arch') makedepends=('git') optdepends=('abs: Provides PKGBUILD prototypes for newpkg') provides=('pkgtools' 'newpkg') @@ -20,7 +20,7 @@ sha1sums=('SKIP') pkgver() { cd "${_pkgname%-git}" - echo "$(date +%Y%m%d).$(git rev-parse --short master)" + echo "$(date +%Y%m%d).$(git rev-list --count master).$(git rev-parse --short master)" } package() { diff --git a/pkgtools.install b/pkgtools.install index dcce756..776a09c 100644 --- a/pkgtools.install +++ b/pkgtools.install @@ -1,6 +1,6 @@ is_update_from() { - res="`vercmp $1 $2`" - case $res in + res="$(vercmp $1 $2)" + case "$res" in '-1'|'0') return 0;; '1') return 1;; esac @@ -23,6 +23,10 @@ post_upgrade() { if is_update_from $2 22-1; then echo " - This is the largest release in a long time. This updates all Python scripts to Python 3." fi + if is_update_from $2 24-1; then + echo " - This update removes the gem2arch and pkgfile scripts. This update also updates pkgconflict to work with pkgfile from [extra] and other minor fixes." + echo " - You may want to remove /var/cache/pkgtools/lists, which is no longer used." + fi } ## arg 1: the old package version