diff options
author | Yurii Kolesnykov | 2022-02-12 06:29:43 +0200 |
---|---|---|
committer | Yurii Kolesnykov | 2022-02-12 06:29:43 +0200 |
commit | 05540d9237658bb87ed0a591afbb48a8daa86492 (patch) | |
tree | 7108249f97d6c03d1546d8ae46a712da7ef6f72c | |
parent | e7ec9865dbf39330b0b3c3e082fe4c47d4967a4b (diff) | |
download | aur-05540d9237658bb87ed0a591afbb48a8daa86492.tar.gz |
7.5.454.r0.g918652058
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 50 |
2 files changed, 21 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore index 86702b8e8344..8783ef89eab0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.pkg.* src/ pkg/ -toggldesktop/
\ No newline at end of file +toggldesktop/ +*.log @@ -5,9 +5,9 @@ # Contributor: phi-mah pkgname=toggldesktop-git -_pkgname=toggldesktop -pkgver=7.5.50.r0.gb3a38da9e -pkgrel=3 +_pkgname=${pkgname%-*} +pkgver=7.5.454.r0.g918652058 +pkgrel=1 pkgdesc="Toggl time tracking software" arch=('x86_64') url="https://github.com/toggl-open-source/toggldesktop" @@ -26,54 +26,42 @@ depends=( makedepends=( 'cmake' 'git' - 'ninja' ) conflicts=("${_pkgname}" "${_pkgname}-bin" 'toggl-bin') provides=("${_pkgname}") -source=( - "${_pkgname}::git+https://github.com/toggl-open-source/toggldesktop.git" - "jsoncpp.patch" -) - +source=("${_pkgname}::git+$url" + "jsoncpp.patch") sha512sums=('SKIP' '05813df185163e1361d99cf24291bd44bdfefeee050b56f2923fb909c2c57d532e0a459cdaea96504ed10d27004fe3ee9f3c34ec35bcc9f9f2e064cccd8cfe77') pkgver() { - cd "${_pkgname}" + cd $_pkgname git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd "${_pkgname}" - - # patch to build - patch -p1 < ../jsoncpp.patch + cd $_pkgname - # although removing _build folder in build() function feels more natural, - # that interferes with the spirit of makepkg --noextract - if [ -d _build ]; then - rm -rf _build - fi + # patch to build + patch -p1 < ../jsoncpp.patch } build() { - mkdir -p _build && cd _build - cmake ../${_pkgname} \ - -G Ninja \ - -DCMAKE_INSTALL_PREFIX=/usr\ - -DTOGGL_VERSION:STRING="${pkgver}"\ - -DTOGGL_PRODUCTION_BUILD=ON\ - -DTOGGL_ALLOW_UPDATE_CHECK=ON\ + cmake -S $_pkgname \ + -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DTOGGL_VERSION:STRING=$pkgver \ + -DTOGGL_PRODUCTION_BUILD=ON \ + -DTOGGL_ALLOW_UPDATE_CHECK=ON \ -DUSE_BUNDLED_LIBRARIES=OFF - ninja + + make -C build } package() { - DESTDIR="$pkgdir" ninja -C _build install - - cd "${_pkgname}" + make -C build DESTDIR="$pkgdir/" install # license file in standard location - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm644 $_pkgname/LICENSE "$pkgdir/usr/share/licenses/$_pkgname}/LICENSE" } |