```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
60 lines
1.6 KiB
Bash
60 lines
1.6 KiB
Bash
# Template file for 'snapper'
|
|
pkgname=snapper
|
|
version=0.9.0
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--disable-zypp --disable-systemd --with-conf=/etc/conf.d"
|
|
conf_files="/etc/conf.d/snapper"
|
|
make_dirs="/etc/snapper/configs 0755 root root"
|
|
hostmakedepends="automake docbook-xsl libtool libxml2-devel libxslt
|
|
gettext pkg-config"
|
|
makedepends="acl-devel boost-devel dbus-devel e2fsprogs-devel libbtrfs-devel
|
|
libmount-devel libxml2-devel pam-devel ncurses-devel ncurses-libtinfo-devel
|
|
json-c-devel"
|
|
depends="dbus"
|
|
short_desc="Tool for Linux filesystem snapshot management"
|
|
maintainer="FollieHiyuki <folliekazetani@protonmail.com>"
|
|
license="GPL-2.0-only"
|
|
homepage="http://snapper.io"
|
|
distfiles="https://github.com/openSUSE/snapper/archive/v${version}.tar.gz"
|
|
checksum=ca7b17d0213aa5281ff08d968b4e029b78bb3870eb79fd7bc7f879b17f5c969e
|
|
lib32disabled=yes
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]
|
|
then
|
|
makedepends+=" gettext-devel"
|
|
LDFLAGS="-lintl"
|
|
fi
|
|
|
|
pre_configure() {
|
|
# rename cron scripts
|
|
sed -i -e 's@suse.de-@@g' scripts/Makefile.am
|
|
# fix config location in cron scripts
|
|
sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-{daily,hourly}
|
|
|
|
# fix pam plugin install location
|
|
sed -i -e 's@shell echo /@shell echo /usr/@g' pam/Makefile.am
|
|
|
|
autoreconf -fi
|
|
}
|
|
|
|
post_install() {
|
|
vinstall data/sysconfig.snapper 644 etc/conf.d snapper
|
|
vsv snapperd
|
|
}
|
|
|
|
libsnapper_package() {
|
|
short_desc+=" - runtime library"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
|
|
snapper-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libsnapper>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|