Please find the attached zfsnap-1.11.1.ebuild. zfsnap is a script for creating rolling zfs snapshots with cron. I suggest app-admin/zfsnap. I have not being able to test this on linux x86 as I had some issues building the spl. I noticed that the /usr/portage/licence/BEER-WARE file references some Poul-Henning Kamp. Reproducible: Always
Created attachment 351754 [details] zfsnap-1.11.1.ebuild
Comment on attachment 351754 [details] zfsnap-1.11.1.ebuild >EAPI=5 > >inherit eutils toolchain-funcs flag-o-matic > >DESCRIPTION="Creates rolling zfs snapshots" >HOMEPAGE="https://github.com/graudeejs/zfSnap" >SRC_URI="https://github.com/graudeejs/zfSnap/archive/v${PV}.zip" > >LICENSE="BEER-WARE" >SLOT="0" >KEYWORDS="~amd64-fbsd" >IUSE="" > >RDEPEND=">=sys-apps/sed-4 It needs sed as a runtime dependency? > >=sys-freebsd/freebsd-cddl-9.0 > sys-devel/bc" >DEPEND=">=sys-apps/sed-4 > app-arch/unzip" Try using variables set earlier to append more dependencies to later variables. >src_unpack() { > unpack ${A} >} This is the default. It should be removed >src_prepare() { > for period in hourly daily weekly monthly; do > cp xPERIODICx_zfSnap.sh ${period}_zfSnap.sh > > sed -i -e "s/xPERIODICx/${period}/g" -e "s|xPREFIXx|${EPREFIX}/usr/sbin|g" ${period}_zfSnap.sh || die "Failed to sed ${period} file" You could role these into one command: sed -e [sed expressions] xPERIODICx_zfSnap.sh > ${period}_zfSnap.sh \ || die "Failed to sed ${period} file" > cp xPERIODICx_zfSnap_delete.sh ${period}_zfSnap_delete.sh > sed -i -e "s/xPERIODICx/${period}/g" -e "s|xPREFIXx|${EPREFIX}/usr/sbin|g" ${period}_zfSnap_delete.sh || die "Failed to sed ${period} delete file" Same here. >pkg_postinst() { > elog "Add configuration to /etc/defaults/periodic.conf" Gentoo has no /etc/defaults. It does have /etc/default/.
(In reply to Jeroen Roovers from comment #2) > It needs sed as a runtime dependency? Yes. > Try using variables set earlier to append more dependencies to later > variables. Shall I introduce a new variable CDEPEND which contains the common dependency and include this when declaring the depenencies? > This is the default. It should be removed Agreed. > You could role these into one command: Ok. > Gentoo has no /etc/defaults. It does have /etc/default/. Ok, so what is common here, look for the file in /etc/default? Perhaps it should be a /etc/zsnap.conf instead? Also, perhaps we have to look into the the manual page for periodic.conf which would seem to imply that the file is in /etc/defaults. It might just be something that came with some freebsd man-page though.