public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2012-10-28  9:52 Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2012-10-28  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     dad6246a8068557fecb4bdb09b0e7a31105e8909
Author:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 28 09:52:00 2012 +0000
Commit:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Sun Oct 28 09:52:21 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=dad6246a

src_install: Fix default function for EAPI4. Bug #405465

---
 ebuild-writing/functions/src_install/text.xml |   26 +++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index e40035b..e1f5c4d 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -31,12 +31,38 @@
 <section>
 <title>Default <c>src_install</c></title>
 <body>
+<p>
+For EAPI &lt; 4, the default <c>src_install</c> function is the following:
+</p>
 <codesample lang="ebuild">
 src_install()
 {
     return
 }
 </codesample>
+<p>
+For EAPI &#8805; 4, the default <c>src_install</c> function is the following:
+</p>
+<codesample lang="ebuild">
+src_install() {
+	if [[ -f Makefile ]] || [[ -f GNUmakefile]] || [[ -f makefile ]] ; then
+		emake DESTDIR="${D}" install
+	fi
+
+	if ! declare -p DOCS >/dev/null 2>&amp;1 ; then
+		local d
+		for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+				FAQ CREDITS CHANGELOG ; do
+			[[ -s "${d}" ]] &amp;&amp; dodoc "${d}"
+		done
+	# TODO: wrong "declare -a" command...
+	elif declare -p DOCS | grep -q `^declare -a` ; then
+		dodoc "${DOCS[@]}"
+	else
+		dodoc ${DOCS}
+	fi
+}
+</codesample>
 </body>
 </section>
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2014-05-04 10:51 Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2014-05-04 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     ae270a6ad3300cdf9872ab671df3e13601b32b82
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat May  3 13:22:45 2014 +0000
Commit:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Sun May  4 10:48:41 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=ae270a6a

Update the src_install reference to favor EAPI >= 4.

X-Gentoo-Bug: 486146
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=486146

---
 ebuild-writing/functions/src_install/text.xml | 82 ++++++++++++++-------------
 1 file changed, 42 insertions(+), 40 deletions(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index b3f8fc8..fe0a738 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -62,18 +62,21 @@ src_install() {
 	fi
 }
 </codesample>
+<important>The following examples assume EAPI &#8805; 4</important>
 </body>
 </section>
 
 <section>
 <title>Sample <c>src_install</c></title>
 <body>
+
 <codesample lang="ebuild">
 src_install() {
-    emake DESTDIR="${D}" install || die "Install failed"
-    dodoc README CHANGES || die
+    emake DESTDIR="${D}" install
+    dodoc README CHANGES
 }
 </codesample>
+
 </body>
 </section>
 
@@ -87,7 +90,7 @@ install to a non-root location. If possible, this should be used:
 </p>
 
 <codesample lang="ebuild">
-    emake DESTDIR="${D}" install || die "Install failed"
+    emake DESTDIR="${D}" install
 </codesample>
 
 <note>
@@ -97,20 +100,18 @@ if you hit an error.
 </note>
 
 <p>
-Sometimes this will end up installing a few things into strange
-places. If and only if this is the case, the <c>einstall</c> function
-can be used:
+  Sometimes this will end up installing a few things into strange
+  places. If and only if this is the case, the <c>einstall</c>
+  function can be used. It is usually necessary to include additional
+  <c>dodoc</c> statements for the <c>README</c>, <c>ChangeLog</c>, etc
+  in these cases:
 </p>
 
 <codesample lang="ebuild">
-    einstall || die "einstall failed"
+    einstall
+    dodoc README CHANGES
 </codesample>
 
-<p>
-It is usually necessary to include additional <c>dodoc</c> statements for the
-<c>README</c>, <c>ChangeLog</c>, etc in these cases.
-</p>
-
 <note>
 There is no need to <c>dodoc</c> <c>COPYING</c>! The license belongs
 to <c>${PORTDIR}/licenses</c>. Sometimes though, you might want to
@@ -124,6 +125,7 @@ example.
 <section>
 <title>Trivial Installs</title>
 <body>
+
 <p>
 For some packages with no <c>Makefile</c> that only install a small
 number of files, writing a manual install using <c>cp</c> is the
@@ -138,58 +140,58 @@ compilation required) themes:
 
 <p>
 Or sometimes a combination of <c>insinto</c> and <c>doins</c> (plus related
-functions -- see Install Functions Reference) <d/> the following is based
+functions -- see <uri link="::function-reference/install-functions"/>) <d/> the following is based
 upon the <c>sys-fs/udev</c> install:
 </p>
 
 <codesample lang="ebuild">
 src_install() {
-    dobin udevinfo || die
-    dobin udevtest || die
+    dobin udevinfo
+    dobin udevtest
     into /
-    dosbin udev || die
-    dosbin udevd || die
-    dosbin udevsend || die
-    dosbin udevstart || die
-    dosbin extras/scsi_id/scsi_id || die
-    dosbin extras/volume_id/udev_volume_id || die
+    dosbin udev
+    dosbin udevd
+    dosbin udevsend
+    dosbin udevstart
+    dosbin extras/scsi_id/scsi_id
+    dosbin extras/volume_id/udev_volume_id
 
     exeinto /etc/udev/scripts
-    doexe extras/ide-devfs.sh || die
-    doexe extras/scsi-devfs.sh || die
-    doexe extras/cdsymlinks.sh || die
-    doexe extras/dvb.sh || die
+    doexe extras/ide-devfs.sh
+    doexe extras/scsi-devfs.sh
+    doexe extras/cdsymlinks.sh
+    doexe extras/dvb.sh
 
     insinto /etc/udev
-    newins "${FILESDIR}/udev.conf.post_050" udev.conf || die
-    doins extras/cdsymlinks.conf || die
+    newins "${FILESDIR}/udev.conf.post_050" udev.conf
+    doins extras/cdsymlinks.conf
 
     # For devfs style layout
     insinto /etc/udev/rules.d/
-    newins etc/udev/gentoo/udev.rules 50-udev.rules || die
+    newins etc/udev/gentoo/udev.rules 50-udev.rules
 
     # scsi_id configuration
     insinto /etc
-    doins extras/scsi_id/scsi_id.config || die
+    doins extras/scsi_id/scsi_id.config
 
     # set up symlinks in /etc/hotplug.d/default
-    dodir /etc/hotplug.d/default || die
-    dosym ../../../sbin/udevsend /etc/hotplug.d/default/10-udev.hotplug || die
+    dodir /etc/hotplug.d/default
+    dosym ../../../sbin/udevsend /etc/hotplug.d/default/10-udev.hotplug
 
     # set up the /etc/dev.d directory tree
-    dodir /etc/dev.d/default || die
-    dodir /etc/dev.d/net || die
+    dodir /etc/dev.d/default
+    dodir /etc/dev.d/net
     exeinto /etc/dev.d/net
-    doexe etc/dev.d/net/hotplug.dev || die
+    doexe etc/dev.d/net/hotplug.dev
 
-    doman *.8 || die
-    doman extras/scsi_id/scsi_id.8 || die
+    doman *.8
+    doman extras/scsi_id/scsi_id.8
 
-    dodoc ChangeLog FAQ HOWTO-udev_for_dev README TODO || die
-    dodoc docs/{overview,udev-OLS2003.pdf,udev_vs_devfs,RFC-dev.d,libsysfs.txt} || die
-    dodoc docs/persistent_naming/* docs/writing_udev_rules/* || die
+    dodoc ChangeLog FAQ HOWTO-udev_for_dev README TODO
+    dodoc docs/{overview,udev-OLS2003.pdf,udev_vs_devfs,RFC-dev.d,libsysfs.txt}
+    dodoc docs/persistent_naming/* docs/writing_udev_rules/*
 
-    newdoc extras/volume_id/README README_volume_id || die
+    newdoc extras/volume_id/README README_volume_id
 }
 </codesample>
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2014-05-04 12:07 Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2014-05-04 12:07 UTC (permalink / raw
  To: gentoo-commits

commit:     afae00687d935fd570620021b7eac46b55d78e86
Author:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
AuthorDate: Sun May  4 12:03:04 2014 +0000
Commit:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Sun May  4 12:03:04 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=afae0068

src_install: EAPI names are strings and not numbers

Thanks to Ulrich Müller <ulm <AT> gentoo.org>
Link: https://bugs.gentoo.org/show_bug.cgi?id=486146#c9

---
 ebuild-writing/functions/src_install/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index fe0a738..2e86cc3 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -62,7 +62,7 @@ src_install() {
 	fi
 }
 </codesample>
-<important>The following examples assume EAPI &#8805; 4</important>
+<important>The following examples assume EAPI 4 or later</important>
 </body>
 </section>
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2014-05-05 10:21 Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2014-05-05 10:21 UTC (permalink / raw
  To: gentoo-commits

commit:     0fe777092c9ea8b80d311a2da9ded592e7870157
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon May  5 02:48:59 2014 +0000
Commit:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Mon May  5 10:19:53 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=0fe77709

src_install: Fix two instances where the language presumed ordered EAPIs.

Link: https://bugs.gentoo.org/show_bug.cgi?id=486146#c15

---
 ebuild-writing/functions/src_install/text.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index 2e86cc3..530baf1 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -32,7 +32,8 @@
 <title>Default <c>src_install</c></title>
 <body>
 <p>
-For EAPI &lt; 4, the default <c>src_install</c> function is the following:
+For EAPIs 0,1,2, and 3, the default <c>src_install</c> function is the
+following:
 </p>
 <codesample lang="ebuild">
 src_install()
@@ -41,7 +42,7 @@ src_install()
 }
 </codesample>
 <p>
-For EAPI &#8805; 4, the default <c>src_install</c> function is the following:
+For EAPIs 4 and later, the default <c>src_install</c> function is the following:
 </p>
 <codesample lang="ebuild">
 src_install() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2016-12-07 19:46 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2016-12-07 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     77bb2f7e1ca5d6066546cadee32f7c47712f888a
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Wed Dec  7 18:53:01 2016 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 19:24:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=77bb2f7e

ebuild-writing/functions/src_install: document the behavior for EAPI 6

 ebuild-writing/functions/src_install/text.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index 530baf1..a1746d9 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -63,6 +63,17 @@ src_install() {
 	fi
 }
 </codesample>
+<p>
+For EAPIs 6 and later, the default <c>src_install</c> function is the following:
+</p>
+<codesample lang="ebuild">
+src_install() {
+    if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+        emake DESTDIR="${D}" install
+    fi
+    einstalldocs
+}
+</codesample>
 <important>The following examples assume EAPI 4 or later</important>
 </body>
 </section>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2018-12-26 13:39 Ulrich Müller
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Müller @ 2018-12-26 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     17092aa93264173f6d3a0773a127d286a3e7dbc4
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 26 13:37:43 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 26 13:37:43 2018 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=17092aa9

ebuild-writing/functions/src_install: Fix syntax error in example.

Closes: https://bugs.gentoo.org/673748
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/functions/src_install/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index 308c718..cf453e9 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -46,7 +46,7 @@ For EAPIs 4 and later, the default <c>src_install</c> function is the following:
 </p>
 <codesample lang="ebuild">
 src_install() {
-	if [[ -f Makefile ]] || [[ -f GNUmakefile]] || [[ -f makefile ]] ; then
+	if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
 		emake DESTDIR="${D}" install
 	fi
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2020-01-09 19:12 Ulrich Müller
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Müller @ 2020-01-09 19:12 UTC (permalink / raw
  To: gentoo-commits

commit:     afc9e4df73a0c17be4ed1e7c63beb8f87ce4d1ae
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 11:54:58 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Jan  9 19:11:30 2020 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=afc9e4df

ebuild-writing/functions/src_install: Don't mention einstall.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/functions/src_install/text.xml | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index 19b3cee..434e01c 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -112,16 +112,14 @@ if you hit an error.
 </note>
 
 <p>
-  Sometimes this will end up installing a few things into strange
-  places. If and only if this is the case, the <c>einstall</c>
-  function can be used. It is usually necessary to include additional
-  <c>dodoc</c> statements for the <c>README</c>, <c>ChangeLog</c>, etc
-  in these cases:
+Usually the package's build system will not install the <c>README</c>,
+<c>ChangeLog</c>, etc. files, so it is necessary to include additional
+<c>dodoc</c> statements for them:
 </p>
 
 <codesample lang="ebuild">
-	einstall
-	dodoc README CHANGES
+    emake DESTDIR="${D}" install
+    dodoc README CHANGES
 </codesample>
 
 <note>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
@ 2020-01-23  7:47 Ulrich Müller
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Müller @ 2020-01-23  7:47 UTC (permalink / raw
  To: gentoo-commits

commit:     ce1f60b461477da6796542a54bfaf3b86283f87f
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 17:58:22 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 07:45:27 2020 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=ce1f60b4

ebuild-writing/functions/src_install: Don't mention old EAPIs.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ebuild-writing/functions/src_install/text.xml | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
index 434e01c..02981ff 100644
--- a/ebuild-writing/functions/src_install/text.xml
+++ b/ebuild-writing/functions/src_install/text.xml
@@ -31,16 +31,7 @@
 <section>
 <title>Default <c>src_install</c></title>
 <body>
-<p>
-For EAPIs 0,1,2, and 3, the default <c>src_install</c> function is the
-following:
-</p>
-<codesample lang="ebuild">
-src_install()
-{
-	return
-}
-</codesample>
+
 <p>
 For EAPIs 4 and later, the default <c>src_install</c> function is the following:
 </p>
@@ -74,7 +65,7 @@ src_install() {
 	einstalldocs
 }
 </codesample>
-<important>The following examples assume EAPI 4 or later</important>
+
 </body>
 </section>
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-23  7:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-23  7:47 [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2020-01-09 19:12 Ulrich Müller
2018-12-26 13:39 Ulrich Müller
2016-12-07 19:46 Göktürk Yüksek
2014-05-05 10:21 Markos Chandras
2014-05-04 12:07 Markos Chandras
2014-05-04 10:51 Markos Chandras
2012-10-28  9:52 Markos Chandras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox