summaryrefslogtreecommitdiffstats
path: root/sys-apps/darklin/darklin-4.0.2.ebuild
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /sys-apps/darklin/darklin-4.0.2.ebuild
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'sys-apps/darklin/darklin-4.0.2.ebuild')
-rw-r--r--sys-apps/darklin/darklin-4.0.2.ebuild85
1 files changed, 85 insertions, 0 deletions
diff --git a/sys-apps/darklin/darklin-4.0.2.ebuild b/sys-apps/darklin/darklin-4.0.2.ebuild
new file mode 100644
index 0000000..cf55522
--- /dev/null
+++ b/sys-apps/darklin/darklin-4.0.2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+inherit eutils
+
+DESCRIPTION="DarkLin Release"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+DARKLIN_DISTRIB="Charon"
+DEPEND="dev-lang/perl"
+
+src_install() {
+ dodir /etc/
+
+ echo ${PV} > ${D}/etc/darklin-version
+ echo "DarkLin IV ($DARKLIN_DISTRIB)" > ${D}/etc/darklin-release
+
+ cat "${FILESDIR}"/issue | sed -e "s/@name@/$DARKLIN_DISTRIB/g" -e "s/@version@/$PV/g" > ${D}/etc/issue
+}
+
+pkg_postinst() {
+perl -s -e '$^I="";
+if (@argv == 2) { $PN=pop(@argv); }
+$NOT_STARTED=1;$COMMENTS=1;$BL="";
+while (<>)
+{
+ $value=$_;
+
+ if ($value=~m/^\s*loginsh=/) {
+ next;
+ }
+
+ if (($COMMENTS)&&($value!~m/^\s*#/)) {
+ print "loginsh=1\n";
+ $COMMENTS=0;
+ }
+
+ if ((defined $PN)&&($value=~m/CfgStart\s*$PN/)) {
+ $NOT_STARTED=0;
+ } elsif ((defined $PN)&&($value=~m/CfgEnd\s*$PN/)) {
+ $NOT_STARTED=1;
+ } elsif ($NOT_STARTED) {
+ if ($value =~ m/^\s*$/) {
+ $BLS.=$value;
+ } else {
+ print $BLS;
+ print $value;
+ $BLS=""
+ }
+ }
+}
+if ($value !~ m/$\s*^/) {
+ print "\n";
+}' -- -PN=darklin /etc/profile
+
+perl -s -e '$^I="";
+if (@argv == 2) { $PN=pop(@argv); }
+$NOT_STARTED=1;$COMMENTS=1;$BL="";
+while (<>)
+{
+ $value=$_;
+
+ if ((defined $PN)&&($value=~m/CfgStart\s*$PN/)) {
+ $NOT_STARTED=0;
+ } elsif ((defined $PN)&&($value=~m/CfgEnd\s*$PN/)) {
+ $NOT_STARTED=1;
+ } elsif ($NOT_STARTED) {
+ if ($value =~ m/^\s*$/) {
+ $BLS.=$value;
+ } else {
+ print $BLS;
+ print $value;
+ $BLS=""
+ }
+ }
+}
+if ($value !~ m/$\s*^/) {
+ print "\n";
+}' -- -PN=darklin /etc/bash/bashrc
+
+ cat "${FILESDIR}"/bashrc >> /etc/bash/bashrc
+ cat "${FILESDIR}"/profile >> /etc/profile
+}