initial import
This commit is contained in:
33
pkgfile/PKGBUILD
Normal file
33
pkgfile/PKGBUILD
Normal file
@@ -0,0 +1,33 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=pkgfile
|
||||
pkgver=21
|
||||
pkgrel=1
|
||||
pkgdesc="A pacman .files metadata explorer"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://github.com/falconindy/pkgfile"
|
||||
license=('Expat')
|
||||
depends=('libarchive' 'curl' 'pcre' 'pacman')
|
||||
makedepends=('meson')
|
||||
optdepends=('cron: to execute scheduled jobs')
|
||||
backup=('etc/cron.daily/pkgfile')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/falconindy/pkgfile/archive/refs/tags/v$pkgver.tar.gz"
|
||||
"pkgfile.cron.daily")
|
||||
install=pkgfile.install
|
||||
sha512sums=('657222f530b110185bc8343d54e1e236bd9ef8aac0e07cb444e304b92e91897fae4f5784a5a48ce8dc6bcae74401c83d12ec93eaa91ce026f4185071e30015b7'
|
||||
'bcb8487d76f893a0b039adeb2d29e5bc5905c8d7cab170c5abdcbad8c2d2744eb865aa78e1cdb5c755b81616041249ec7c5b3029b8c525c31c80424de119cfa6')
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
hyperbola-meson build -D systemd_units=false
|
||||
ninja -v -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
DESTDIR=$pkgdir ninja -C build install
|
||||
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -Dm744 "$srcdir/pkgfile.cron.daily" "$pkgdir/etc/cron.daily/pkgfile"
|
||||
}
|
||||
24
pkgfile/pkgfile.cron.daily
Normal file
24
pkgfile/pkgfile.cron.daily
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
|
||||
NICE=19
|
||||
|
||||
# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
|
||||
IONICE_CLASS=2
|
||||
|
||||
# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
|
||||
IONICE_PRIORITY=7
|
||||
|
||||
CMD_LOGROTATE="/usr/bin/pkgfile -u"
|
||||
|
||||
if [ -x /usr/bin/nice ]; then
|
||||
CMD_LOGROTATE="/usr/bin/nice -n ${NICE:-19} ${CMD_LOGROTATE}"
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/ionice ]; then
|
||||
CMD_LOGROTATE="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${CMD_LOGROTATE}"
|
||||
fi
|
||||
|
||||
${CMD_LOGROTATE}
|
||||
|
||||
exit 0
|
||||
18
pkgfile/pkgfile.install
Normal file
18
pkgfile/pkgfile.install
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
post_install() {
|
||||
printf "==> Run 'pkgfile --update' to initialize the database\n"
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# the cache dir might not be removed, notify the user
|
||||
if [ -d var/cache/pkgfile ]; then
|
||||
printf "==> /var/cache/pkgfile has not been removed\n"
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
if [ "$(vercmp 5 "$2")" -eq 1 ]; then
|
||||
printf "==> DB format has changed. Please run pkgfile -uu\n"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user