summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authornl67202018-07-11 21:52:57 +0300
committernl67202018-07-11 21:52:57 +0300
commit9d9ba820757761ab018f64468e2b5cb986e8cdcf (patch)
tree62f659fbfbd4f9c7299217653ebca0dbc3b9390b /PKGBUILD
parent3859c23eec2b09d60b072926afc11006fc2d3d05 (diff)
downloadaur-9d9ba820757761ab018f64468e2b5cb986e8cdcf.tar.gz
Improve PKGBUILD
Make it more consistent with the gptfdisk package's PKGBUILD. Use less custom variables. Use HTTPS for source.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 25 insertions, 32 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4b852319744e..6236e26a2bf0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,56 +1,49 @@
# Maintainer: Chris Severance aur.severach AatT spamgourmet.com
+# Contributor: nl6720 <nl6720@gmail.com>
# Contributor: Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Contributor: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Hokum <hokum_at_mail_dot_ru>
-_pkgname="gptfdisk"
-pkgname="${_pkgname}-git"
-pkgver=1.0.4.r177.g4cd84de
+pkgname='gptfdisk-git'
+pkgver=1.0.4.r177.4cd84de
pkgrel=1
-pkgdesc='A text-mode partitioning tool that works on Globally Unique Identifier (GUID) Partition Table (GPT) disks - GIT Version'
-arch=('i686' 'x86_64')
-url='http://www.rodsbooks.com/gdisk/'
+pkgdesc='A text-mode partitioning tool that works on GUID Partition Table (GPT) disks - GIT Version'
+arch=('x86_64')
+url='https://www.rodsbooks.com/gdisk/'
license=('GPL2')
-depends=('gcc-libs' 'util-linux' 'popt' 'ncurses')
makedepends=('git')
-provides=("${_pkgname}=${pkgver%%.r*}")
-conflicts=("${_pkgname}")
-options=('strip' '!emptydirs' 'zipman' '!libtool' 'docs')
-_srcdir="${_pkgname}"
-source=("gptfdisk::git+http://git.code.sf.net/p/gptfdisk/code#branch=master")
+depends=('gcc-libs' 'popt' 'libuuid.so' 'libncursesw.so')
+conflicts=("${pkgname%-git}" 'gdisk')
+provides=("${pkgname%-git}=${pkgver}" "gdisk=${pkgver}")
+source=("${pkgname%-git}::git+https://git.code.sf.net/p/gptfdisk/code#branch=master")
sha256sums=('SKIP')
pkgver() {
- cd "${_srcdir}"
-
- local _ACTUAL_VER
- _ACTUAL_VER="$(grep -e '#define GPTFDISK_VERSION' "${srcdir}/${_pkgname}/support.h" | awk '{print $3}' | sed -e 's|"||g')"
- echo "${_ACTUAL_VER}.r$(git rev-list --count HEAD).g$(git describe --always)" | sed -e 's|-|.|g'
+ cd "${srcdir}/${pkgname%-git}"
+ printf '%s.r%s.%s' "$(grep -Po 'GPTFDISK_VERSION "\K[\d.]+' "${srcdir}/${pkgname%-git}/support.h")" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- cd "${_srcdir}"
-
+ cd "${srcdir}/${pkgname%-git}"
git clean -x -d -f
- echo
-
git reset --hard
- echo
-
- sed -e 's|ncursesw/ncurses.h|ncurses.h|g' -i 'gptcurses.cc'
}
build() {
- cd "${_srcdir}"
- make V=1
- echo
+ cd "${srcdir}/${pkgname%-git}"
+ make
}
-package() {
- cd "${_srcdir}"
- install -Dpm0755 'gdisk' 'cgdisk' 'sgdisk' 'fixparts' -t "${pkgdir}/usr/bin"
- install -Dpm0644 'gdisk.8' 'cgdisk.8' 'sgdisk.8' 'fixparts.8' -t "${pkgdir}/usr/share/man/man8"
+check() {
+ cd "${srcdir}/${pkgname%-git}"
+ make test
+}
- install -Dpm0644 'README' 'NEWS' -t "${pkgdir}/usr/share/${_pkgname}"
+package() {
+ cd "${srcdir}/${pkgname%-git}"
+ install -d "${pkgdir}/usr/"{bin,share/{doc/gdisk,man/man8}}
+ install -t "${pkgdir}/usr/bin" {,c,s}gdisk fixparts
+ install -m644 -t "${pkgdir}/usr/share/man/man8" {{,c,s}gdisk,fixparts}.8
+ install -m644 -t "${pkgdir}/usr/share/doc/gdisk" README NEWS
}