Skip to content

Commit 8b7074e

Browse files
committed
packaging: v1.1.1 checksum, drop obsolete prepare() (GitHub tarball extracts to memflux-<ver>)
1 parent 8283c3a commit 8b7074e

3 files changed

Lines changed: 62 additions & 13 deletions

File tree

‎PKGBUILD‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Maintainer: Twyx22 <matt.sim62@gmail.com>
2+
# Contributor: memflux contributors
3+
4+
pkgname=memflux
5+
pkgver=1.1.1
6+
pkgrel=1
7+
pkgdesc="Adaptive memory reclamation for Linux — reclaim dormant RAM without killing processes"
8+
arch=('x86_64')
9+
url="https://github.com/Twyx22/memflux"
10+
license=('MIT')
11+
depends=('glibc' 'systemd' 'zram-generator')
12+
makedepends=('cmake' 'gcc' 'clang' 'libbpf' 'libelf' 'linux-headers')
13+
optdepends=('bpftool: inspect eBPF maps')
14+
provides=('memflux')
15+
conflicts=('memflux-git')
16+
backup=('etc/memflux.conf')
17+
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
18+
# NOTE: GitHub release tarballs embed mtimes and are not byte-reproducible;
19+
# update this checksum on each version bump (makepkg prints the mismatch).
20+
sha256sums=('9e582036710a917a8e702dd9e9323bb9bce1176a5314f8d9c4c96a6ea1258c10')
21+
install=memflux.install
22+
23+
prepare() {
24+
# the GitHub tarball extracts to "memflux" — rename for consistency
25+
rm -rf "$srcdir/$pkgname-$pkgver"
26+
mv "$srcdir/memflux" "$srcdir/$pkgname-$pkgver"
27+
}
28+
29+
build() {
30+
cd "$pkgname-$pkgver"
31+
cmake -S . -B build \
32+
-DCMAKE_BUILD_TYPE=Release \
33+
-DCMAKE_INSTALL_PREFIX=/usr \
34+
-DMEMFLUX_EBPF_PATH=/usr/lib/memflux/ebpf_access.bpf.o
35+
cmake --build build -j"$(nproc)"
36+
ctest --test-dir build --output-on-failure
37+
}
38+
39+
package() {
40+
cd "$pkgname-$pkgver"
41+
42+
install -Dm755 build/memfluxd "$pkgdir/usr/bin/memfluxd"
43+
install -Dm755 build/memfluxctl "$pkgdir/usr/bin/memfluxctl"
44+
install -Dm755 build/memflux-hog "$pkgdir/usr/bin/memflux-hog"
45+
install -Dm755 build/bench_alloc "$pkgdir/usr/bin/bench_alloc"
46+
install -Dm755 build/libmemflux-preload.so "$pkgdir/usr/lib/libmemflux-preload.so"
47+
install -Dm644 build/ebpf_access.bpf.o "$pkgdir/usr/lib/memflux/ebpf_access.bpf.o"
48+
49+
# config : /etc (backup-able)
50+
install -Dm644 config/memflux.conf "$pkgdir/etc/memflux.conf"
51+
52+
# systemd
53+
install -Dm644 config/memfluxd.service "$pkgdir/usr/lib/systemd/system/memfluxd.service"
54+
install -Dm644 packaging/memfluxd.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/memfluxd.conf"
55+
install -Dm644 packaging/memflux.sysusers "$pkgdir/usr/lib/sysusers.d/memflux.conf"
56+
57+
# man page courte + docs
58+
install -Dm644 README.md "$pkgdir/usr/share/doc/memflux/README.md"
59+
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/memflux/LICENSE"
60+
}

‎packaging/arch/PKGBUILD‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Contributor: memflux contributors
33

44
pkgname=memflux
5-
pkgver=1.1.0
5+
pkgver=1.1.1
66
pkgrel=1
77
pkgdesc="Adaptive memory reclamation for Linux — reclaim dormant RAM without killing processes"
88
arch=('x86_64')
@@ -17,15 +17,9 @@ backup=('etc/memflux.conf')
1717
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
1818
# NOTE: GitHub release tarballs embed mtimes and are not byte-reproducible;
1919
# update this checksum on each version bump (makepkg prints the mismatch).
20-
sha256sums=('6938b43616ec5e451d2544c31493def3b7df0e6e4f9c6b587bbf85f859f30d92')
20+
sha256sums=('9e582036710a917a8e702dd9e9323bb9bce1176a5314f8d9c4c96a6ea1258c10')
2121
install=memflux.install
2222

23-
prepare() {
24-
# the GitHub tarball extracts to "memflux" — rename for consistency
25-
rm -rf "$srcdir/$pkgname-$pkgver"
26-
mv "$srcdir/memflux" "$srcdir/$pkgname-$pkgver"
27-
}
28-
2923
build() {
3024
cd "$pkgname-$pkgver"
3125
cmake -S . -B build \

‎packaging/arch/PKGBUILD-git‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ pkgver() {
1919
printf "1.1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
2020
}
2121

22-
prepare() {
23-
# nothing to rename: git clone preserves the repo name "memflux"
24-
true
25-
}
26-
2722
build() {
2823
cd memflux
2924
cmake -S . -B build \

0 commit comments

Comments
 (0)