summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 506c009ec62dba465ec67d7767542b7a972a42ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Fabio 'Lolix' Loli <lolix@disroot.org>
# Contributor: Tim Schumacher <timschumi@gmx.de>
# Contributor: KillWolfVlad <github.com/KillWolfVlad>
# Contributor: WaveHack <email@wavehack.net>
# Contributor: Whovian9369 <Whovian9369@gmail.com>
# Contributor: Angelo Theodorou <encelo@gmail.com>

pkgname=gittyup
pkgver=1.4.0
pkgrel=2
pkgdesc='Graphical Git client (GitAhead fork)'
url="https://murmele.github.io/${pkgname^}"
_url="https://github.com/Murmele/${pkgname^}"
arch=(x86_64)
license=(MIT)
depends=(cmark
         git
         hunspell
         libssh2
         lua
         lua-lpeg
         openssl
         qt5-base)
makedepends=(cmake
             libgnome-keyring
             ninja
             qt5-tools
             qt5-translations)
optdepends=('git-lfs: git-lfs support'
            'libgnome-keyring: for GNOME Keyring for auth credentials'
            'qt5-translations: translations')
source=("git+$_url.git#tag=${pkgname}_v$pkgver"
        "$pkgname-libgit2::git+https://github.com/stinb/libgit2.git" # a fork, not the official upstream!
        "$pkgname-lexilla::git+https://github.com/ScintillaOrg/lexilla.git"
        "$pkgname-scintillua::git+https://github.com/orbitalquark/scintillua.git"
        "$pkgname-zip::git+https://github.com/kuba--/zip.git")
sha256sums=('06e1d79a3a3062c2ab37ad3a0a8f67d74d0c19210a9defac2b5e9e68e70feb1f'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

prepare() {
	cd "${pkgname^}"
	# https://github.com/Murmele/Gittyup/issues/766
	git cherry-pick -n d36eba172a01d541945d59427b4f643aaed55da0
	git submodule init
	for submodule in cmark git hunspell libssh2 openssl; do
		git config "submodule.dep/$submodule/$submodule.update" none
	done
	for submodule in libgit2 lexilla scintillua zip; do
		git config "submodule.dep/$submodule/$submodule.url" "$srcdir/$pkgname-$submodule"
	done
	git -c protocol.file.allow=always submodule update
}

build() {
	local _flags=(
		-G Ninja
		-W no-dev
		-D CMAKE_BUILD_TYPE=None
		-D CMAKE_INSTALL_PREFIX=/usr
		-D CMAKE_INSTALL_DATADIR=share
		-D DEBUG_OUTPUT=OFF
		-D LUA_MODULES_PATH=/usr/lib/lua/5.4
		-D ENABLE_REPRODUCIBLE_BUILDS=OFF
		-D ENABLE_UPDATE_OVER_GUI=OFF
		-D GENERATE_APPDATA=OFF
		-D BUILD_SHARED_LIBS=OFF
		-D USE_SYSTEM_CMARK=ON
		-D USE_SYSTEM_GIT=ON
		-D USE_SYSTEM_HUNSPELL=ON
		-D USE_SYSTEM_LIBGIT2=OFF # system libgit2 too new
		-D USE_SYSTEM_LIBSSH2=ON
		-D USE_SYSTEM_LUA=ON
		-D USE_SYSTEM_OPENSSL=ON
		-D USE_SYSTEM_QT=ON
	)
	cmake "${_flags[@]}" \
		-B build \
		-S "${pkgname^}"
	cmake --build build
	# ninja -C build
}

check() {
	ninja -C build check
}

package() {
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" "${pkgname^}/LICENSE.md"
	install -Dm0644 "${pkgname^}/rsrc/linux/com.github.Murmele.Gittyup.desktop" "$pkgdir/usr/share/applications/gittyup.desktop"
	DESTDIR="$pkgdir" ninja -C build install
	pushd "$pkgdir/usr"
	rm -f lib/libQt*.so.* lib/*.a
	rm -rf include lib/{cmake,pkgconfig,Plugins}
	mv bin/{indexer,relauncher} "share/${pkgname^}"
}