blob: 5d562b8107bb8dfc786914ecde9b3b897b2324b4 (
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
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=linyaps-web-store-installer-git
_tagname=1.6.8
pkgver=1.6.8.r2.9f0c738
pkgrel=1
pkgdesc='玲珑(Linglong)linyaps-web-store-installer is a package installer for the Linyaps Web store.'
arch=($CARCH)
url='https://github.com/OpenAtom-Linyaps/linyaps-web-store-installer'
license=('LGPL-3.0-or-later')
provides=(
${pkgname%-git}
)
conflicts=(
${pkgname%-git}
)
replaces=()
_qt=qt6
depends=(
gcc-libs
glibc
linyaps
${_qt}-base
xdg-utils
)
makedepends=(
cmake
git
gtest
ninja
${_qt}-tools
pkgconf
vulkan-headers
)
checkdepends=()
optdepends=(
"linglong-pica: deb package to Linglong package tool."
)
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname}"
(
set -o pipefail
latest_tag=$(git tag --sort=-version:refname | grep -Ev '^[vV]' | head -1)
commit_count=$(git rev-list --count "${latest_tag}..HEAD")
commit_hash=$(git rev-parse --short=7 HEAD)
printf "%s.r%s.%s" "${latest_tag}" "${commit_count}" "${commit_hash}"||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}
prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
}
build() {
cd "${srcdir}"/${pkgname}/
# see:https://wiki.archlinux.org/title/CMake_package_guidelines
cmake -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-Wno-dev \
-B build \
-G Ninja
ninja -C build
}
# check() {
# cd "${srcdir}"/${pkgname}/
# ctest --test-dir build --output-on-failure
# }
package() {
cd "${srcdir}"/${pkgname}
DESTDIR="${pkgdir}" ninja -C build install
install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
|