diff options
author | Yurii Kolesnykov | 2020-02-02 23:31:22 +0200 |
---|---|---|
committer | Yurii Kolesnykov | 2020-02-02 23:31:22 +0200 |
commit | 2956e62ec4b56f99eee8d879d9e903f8bfe9e4da (patch) | |
tree | 5daef6438283643c69ff63c412e7e40fad5b0f41 | |
download | aur-2956e62ec4b56f99eee8d879d9e903f8bfe9e4da.tar.gz |
init
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 76 | ||||
-rw-r--r-- | jsoncpp.patch | 18 |
4 files changed, 126 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..48787f93e8c8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = toggldesktop-git + pkgdesc = Toggl time tracking software + pkgver = v7.5.33.r0.g206717021 + pkgrel = 1 + url = https://github.com/toggl-open-source/toggldesktop + arch = x86_64 + license = BSD + makedepends = cmake + makedepends = ninja + depends = libxss + depends = qt5-base + depends = qt5-webengine + depends = qt5-x11extras + depends = openssl + depends = poco + depends = lua + depends = jsoncpp + provides = toggldesktop + conflicts = toggldesktop + conflicts = toggldesktop-bin + conflicts = toggl-bin + source = toggldesktop::git+https://github.com/toggl-open-source/toggldesktop.git + source = jsoncpp.patch + sha512sums = SKIP + sha512sums = 05813df185163e1361d99cf24291bd44bdfefeee050b56f2923fb909c2c57d532e0a459cdaea96504ed10d27004fe3ee9f3c34ec35bcc9f9f2e064cccd8cfe77 + +pkgname = toggldesktop-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..86702b8e8344 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.pkg.* +src/ +pkg/ +toggldesktop/
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ca498d02dc7e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Yurii Kolesnykov <root@yurikoles.com> +# Contributor: Samuel Walladge <samuel at swalladge dot id dot au> +# Contributor: Karel Louwagie <karel@louwagie.net> +# Contributor: Serge Pavlyuk <flopss at gmail dot com> +# Contributor: phi-mah + +pkgname=toggldesktop-git +_pkgname=toggldesktop +pkgver=v7.5.33.r0.g206717021 +pkgrel=1 +pkgdesc="Toggl time tracking software" +arch=('x86_64') +url="https://github.com/toggl-open-source/toggldesktop" +license=('BSD') +depends=( + 'libxss' + 'qt5-base' + 'qt5-webengine' + 'qt5-x11extras' + 'openssl' + 'poco' + 'lua' + 'jsoncpp' +) +makedepends=('cmake' 'ninja') +conflicts=("${_pkgname}" "${_pkgname}-bin" 'toggl-bin') +provides=("${_pkgname}") +source=( + "${_pkgname}::git+https://github.com/toggl-open-source/toggldesktop.git" + "jsoncpp.patch" +) + +sha512sums=( + 'SKIP' + '05813df185163e1361d99cf24291bd44bdfefeee050b56f2923fb909c2c57d532e0a459cdaea96504ed10d27004fe3ee9f3c34ec35bcc9f9f2e064cccd8cfe77' +) + +pkgver() { + cd "${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${_pkgname}" + + # patch to build + patch -p1 < ../jsoncpp.patch + + # 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 +} + +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\ + -DUSE_BUNDLED_LIBRARIES=OFF + ninja +} + +package() { + DESTDIR="$pkgdir" ninja -C _build install + + cd "${_pkgname}" + + # license file in standard location + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" +} + diff --git a/jsoncpp.patch b/jsoncpp.patch new file mode 100644 index 000000000000..3c4cddc830a2 --- /dev/null +++ b/jsoncpp.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b52dbb3..f278060 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,10 +37,9 @@ + include_directories(${LUA_INCLUDE_DIRS}) + + # Look for JSON +- find_package(jsoncpp CONFIG) +- if(jsoncpp_FOUND) +- set(JSONCPP_LIBRARIES jsoncpp_lib) +- endif() ++ pkg_search_module(jsoncpp jsoncpp) ++ include_directories(${jsoncpp_INCLUDE_DIRS}) ++ set(JSONCPP_LIBRARIES ${jsoncpp_LIBRARIES}) + + # Look for Qxt + pkg_search_module(QXT_CORE QxtCore-qt5) |