blob: 6864eba3d2ab0de38deb66af7c139ed195bd14cd (
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
_pkgname=kazv
pkgname="${_pkgname}-git"
pkgver=0.3.0.r593.20240614.85ea79d
pkgrel=1
pkgdesc="A Qt5 matrix client."
arch=(
'aarch64'
'armv6h'
'armv7h'
'i686'
'x86_64'
)
license=('AGPL3')
url="https://lily-is.land/kazv/kazv"
backup=()
depends=(
'boost-libs>=1.83.0'
'fontconfig'
'freetype2'
'gcc-libs'
'glibc'
'kconfig5>=5.111.0'
'kio5>=5.78'
'kirigami2>=5.78'
'libkazv'
'nlohmann-json'
'qt5-base>=5.15.11'
'qt5-declarative>=5.15.11'
'qt5-multimedia'
'qt5-svg'
'qt5-quickcontrols2'
)
makedepends=(
'boost>=1.83.0'
'cmake'
'extra-cmake-modules>=5.78'
'git'
'pkgconf'
)
optdepends=()
provides=("${_pkgname}=${pkgver}")
conflicts=("${_pkgname}")
source=(
"${_pkgname}::git+${url}.git"
)
sha256sums=(
'SKIP'
)
prepare() {
cd "${srcdir}/${_pkgname}"
git log > git.log
}
pkgver() {
cd "${srcdir}/${_pkgname}"
_ver_major="$(grep -Em1 '^[^#]*set\(kazv_VERSION_MAJOR' CMakeLists.txt | sed -E 's|.*kazv_VERSION_MAJOR[[:space:]]+([^\)]*)\).*|\1|')"
_ver_minor="$(grep -Em1 '^[^#]*set\(kazv_VERSION_MINOR' CMakeLists.txt | sed -E 's|.*kazv_VERSION_MINOR[[:space:]]+([^\)]*)\).*|\1|')"
_ver_patch="$(grep -Em1 '^[^#]*set\(kazv_VERSION_PATCH' CMakeLists.txt | sed -E 's|.*kazv_VERSION_PATCH[[:space:]]+([^\)]*)\).*|\1|')"
_ver="${_ver_major}.${_ver_minor}.${_ver_patch}"
_rev="$(git rev-list --count HEAD)"
_date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
_hash="$(git rev-parse --short HEAD)"
if [ -z "${_ver}" ]; then
error "Version could not be determined."
return 1
else
printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
fi
}
build() {
cd "${srcdir}/${_pkgname}"
mkdir -p build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DBUILD_COVERAGE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON \
-DBUILD_WITH_QT6=OFF \
-DENABLE_BSYMBOLICFUNCTIONS=ON \
-DKDE_INSTALL_PREFIX_SCRIPT=OFF \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DKDE_L10N_AUTO_TRANSLATIONS=ON \
-DKDE_L10N_BRANCH=trunk \
..
make
}
check() {
cd "${srcdir}/${_pkgname}/build"
## Actually requires graphical environment to be active!
plain "'make test' requires a graphical environment beeing active!"
make test || true # Exit true anyway because the test will fail if no graphical environment is active.
}
package() {
cd "${srcdir}/${_pkgname}/build"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/${_pkgname}"
for _docfile in 'git.log' 'README.md' 'CHANGELOG.md'; do
install -Dvm644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
done
for _licensefile in COPYING; do
install -Dvm644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/${_licensefile}"
ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/${_licensefile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_licensefile}"
done
}
|