Index: eclass/systemd.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v retrieving revision 1.11 diff -u -u -r1.11 systemd.eclass --- eclass/systemd.eclass 7 Jan 2012 17:53:47 -0000 1.11 +++ eclass/systemd.eclass 16 Aug 2012 19:06:21 -0000 @@ -25,6 +25,8 @@ # } # @CODE +inherit tmpfiles-d + case ${EAPI:-0} in 0|1|2|3|4) ;; *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established." @@ -89,10 +91,7 @@ systemd_dotmpfilesd() { debug-print-function ${FUNCNAME} "${@}" - ( - insinto /usr/lib/tmpfiles.d/ - doins "${@}" - ) + dotmpfiles_d "${@}" } # @FUNCTION: systemd_enable_service Index: eclass/tmpfiles-d.eclass =================================================================== RCS file: eclass/tmpfiles-d.eclass diff -N eclass/tmpfiles-d.eclass --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ eclass/tmpfiles-d.eclass 16 Aug 2012 19:06:21 -0000 @@ -0,0 +1,57 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# @ECLASS: tmpfilesd.eclass +# @MAINTAINER: +# slyfox@gentoo.org +# @AUTHOR: +# Based on bash-completion-r1.eclass by Michał Górny . +# @BLURB: Helpers to install tmpfiles.d files. +# @DESCRIPTION: +# As described in http://0pointer.de/public/systemd-man/tmpfiles.d.html +# helpers allow installing package's tmpfiles.d into /usr/lib/tmpfiles.d +# @EXAMPLE: +# +# @CODE +# EAPI=4 +# +# src_install() { +# default +# +# newtmpfiles_d ${FILESDIR}/tmpfilesd.conf ${PN}.conf +# } +# @CODE + +case ${EAPI:-0} in + 0|1|2|3|4) ;; + *) die "EAPI ${EAPI} is unknown." +esac + +# @FUNCTION: dotmpfiles_d +# @USAGE: file [...] +# @DESCRIPTION: +# Install tmpfiles.d files passed as args. Has EAPI-dependant failure +# behavior (like doins). +dotmpfiles_d() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto /usr/lib/tmpfiles.d + doins "${@}" + ) +} + +# @FUNCTION: newtmpfilesd +# @USAGE: file newname +# @DESCRIPTION: +# Install tmpfiles.d file under a new name. Has EAPI-dependant failure +# behavior (like newins). +newtmpfiles_d() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto /usr/lib/tmpfiles.d + newins "${@}" + ) +} --- net-ftp/proftpd/proftpd-1.3.4a-r1.ebuild 2012-05-29 20:16:51.806921163 +0300 +++ net-ftp/proftpd/proftpd-1.3.4a-r2.ebuild 2012-08-16 22:02:41.146331472 +0300 @@ -3,7 +3,7 @@ # $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.4a-r1.ebuild,v 1.2 2012/05/13 10:49:47 swift Exp $ EAPI=4 -inherit eutils +inherit eutils tmpfiles-d MOD_CASE="0.7" MOD_CLAMAV="0.11rc" @@ -216,6 +216,8 @@ docinto rfc dodoc doc/rfc/*.txt fi + + newtmpfiles_d ${FILESDIR}/tmpfilesd.conf ${PN}.conf } pkg_postinst() {