blob: 8b92801540e564b916aa96deeb5d1cac040036b5 (
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: Adrian <adrian@mxlinux.org>
# PKGBUILD for building on the Open Build Service.
#
# OBS build VMs have no network, so every source has to be present in the
# package's OBS sources before the build starts. This consumes the Debian
# native tarball that release builds commit to debs/ - it carries the complete
# source tree - instead of fetching a GitHub tarball the way aur/PKGBUILD does.
#
# Keep pkgver in step with debian/changelog: it names the tarball. It is
# deliberately independent of aur/PKGBUILD's pkgver, which carries an "arch"
# suffix and may run ahead of the Debian version.
pkgname=mx-cleanup
pkgver=26.11
pkgrel=1
pkgdesc="GUI for system cleanup and maintenance"
arch=('x86_64' 'i686')
url="https://github.com/mxlinux/mx-cleanup"
license=('GPL3')
depends=('qt6-base' 'polkit')
makedepends=('cmake' 'ninja' 'qt6-tools')
# makepkg looks for this next to the PKGBUILD, not inside the unpacked source,
# so arch/mx-cleanup.install is a copy of the one in the repository root.
install=mx-cleanup.install
source=("https://github.com/MX-Linux/mx-cleanup/archive/refs/tags/26.11.tar.gz")
sha256sums=('abc618b018fa7eedbe9d3805447f5e82b30ee26b8e624bd7f49ed6dce0ce0c80')
# dpkg-source packed this tarball from a directory called "src", so that - not
# ${pkgname}-${pkgver} - is what it unpacks to.
_srcdir="mx-cleanup-26.11"
build() {
cd "${srcdir}/${_srcdir}"
rm -rf build
# CMake's project() VERSION only accepts numeric major.minor.patch.tweak.
# Unlike aur/PKGBUILD's tag-derived pkgver, this one comes straight from
# debian/changelog and is already numeric, so pass it through as-is.
cmake -G Ninja \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DHELPER_INSTALL_DIR=/usr/lib/mx-cleanup \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DPROJECT_VERSION_OVERRIDE="${pkgver}"
cmake --build build --parallel
}
package() {
cd "${srcdir}/${_srcdir}"
install -Dm755 build/mx-cleanup "${pkgdir}/usr/bin/mx-cleanup"
# "install -D" with several sources needs -t, and then creates the
# destination directory itself, so the separate install -dm755 is gone. No
# error suppression either: the old "2>/dev/null || true" swallowed a glob
# that matched nothing, shipping the package with no translations at all.
install -Dm644 -t "${pkgdir}/usr/share/mx-cleanup/locale/" build/*.qm
install -dm755 "${pkgdir}/usr/lib/mx-cleanup"
install -Dm755 build/helper "${pkgdir}/usr/lib/mx-cleanup/helper"
install -Dm755 scripts/helper-terminal-keep-open "${pkgdir}/usr/lib/mx-cleanup/helper-terminal-keep-open"
install -Dm644 build/org.mxlinux.pkexec.mx-cleanup-helper.policy \
"${pkgdir}/usr/share/polkit-1/actions/org.mxlinux.pkexec.mx-cleanup-helper.policy"
install -Dm644 mx-cleanup.desktop "${pkgdir}/usr/share/applications/mx-cleanup.desktop"
install -Dm644 images/mx-cleanup.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/mx-cleanup.png"
install -dm755 "${pkgdir}/usr/share/doc/mx-cleanup"
if [ -d help ]; then
cp -r help/* "${pkgdir}/usr/share/doc/mx-cleanup/" 2>/dev/null || true
fi
# namcap flags a declared license= with nothing under
# /usr/share/licenses. The file is in the source; it was simply never
# installed.
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|