sys-auth/realtime-base: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Wed, 3 Jan 2018 18:37:12 +0000 (19:37 +0100)
committerDavid Seifert <soap@gentoo.org>
Wed, 3 Jan 2018 18:37:12 +0000 (19:37 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

sys-auth/realtime-base/realtime-base-0.1.ebuild

index 7af8533be7c8d3cdee3f2cafdee05cb948db53a5..1fc02cd38e08c059dcc19f0f3735d703c68dfc9c 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=3
+EAPI=6
 
 inherit user
 
@@ -17,30 +17,30 @@ IUSE=""
 DEPEND=""
 RDEPEND="virtual/pam"
 
+S=${WORKDIR}
+
 limitsdfile=40-${PN}.conf
 rtgroup=realtime
 
-S=${WORKDIR}
-
 pkg_setup() {
        enewgroup ${rtgroup}
 }
 
-print_limitsdfile() {
-       printf "# Start of ${limitsdfile} from ${P}\n\n"
-       printf "@${rtgroup}\t-\trtprio\t99\n"
-       printf "@${rtgroup}\t-\tmemlock\tunlimited\n"
-       printf "\n# End of ${limitsdfile} from ${P}\n"
-}
-
 src_compile() {
        einfo "Generating ${limitsdfile}"
-       print_limitsdfile > "${S}/${limitsdfile}"
+       cat > ${limitsdfile} <<- EOF || die
+               # Start of ${limitsdfile} from ${P}
+
+               @${rtgroup}     -       rtprio  99
+               @${rtgroup}     -       memlock unlimited
+
+               # End of ${limitsdfile} from ${P}
+       EOF
 }
 
 src_install() {
        insinto /etc/security/limits.d/
-       doins "${S}/${limitsdfile}" || die
+       doins ${limitsdfile}
 }
 
 pkg_postinst() {