Gentoo Archives: gentoo-commits

From: Markos Chandras <hwoarang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/src_install/
Date: Sun, 04 May 2014 10:51:48
Message-Id: 1399200521.ae270a6ad3300cdf9872ab671df3e13601b32b82.hwoarang@gentoo
1 commit: ae270a6ad3300cdf9872ab671df3e13601b32b82
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 3 13:22:45 2014 +0000
4 Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
5 CommitDate: Sun May 4 10:48:41 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=ae270a6a
7
8 Update the src_install reference to favor EAPI >= 4.
9
10 X-Gentoo-Bug: 486146
11 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=486146
12
13 ---
14 ebuild-writing/functions/src_install/text.xml | 82 ++++++++++++++-------------
15 1 file changed, 42 insertions(+), 40 deletions(-)
16
17 diff --git a/ebuild-writing/functions/src_install/text.xml b/ebuild-writing/functions/src_install/text.xml
18 index b3f8fc8..fe0a738 100644
19 --- a/ebuild-writing/functions/src_install/text.xml
20 +++ b/ebuild-writing/functions/src_install/text.xml
21 @@ -62,18 +62,21 @@ src_install() {
22 fi
23 }
24 </codesample>
25 +<important>The following examples assume EAPI &#8805; 4</important>
26 </body>
27 </section>
28
29 <section>
30 <title>Sample <c>src_install</c></title>
31 <body>
32 +
33 <codesample lang="ebuild">
34 src_install() {
35 - emake DESTDIR="${D}" install || die "Install failed"
36 - dodoc README CHANGES || die
37 + emake DESTDIR="${D}" install
38 + dodoc README CHANGES
39 }
40 </codesample>
41 +
42 </body>
43 </section>
44
45 @@ -87,7 +90,7 @@ install to a non-root location. If possible, this should be used:
46 </p>
47
48 <codesample lang="ebuild">
49 - emake DESTDIR="${D}" install || die "Install failed"
50 + emake DESTDIR="${D}" install
51 </codesample>
52
53 <note>
54 @@ -97,20 +100,18 @@ if you hit an error.
55 </note>
56
57 <p>
58 -Sometimes this will end up installing a few things into strange
59 -places. If and only if this is the case, the <c>einstall</c> function
60 -can be used:
61 + Sometimes this will end up installing a few things into strange
62 + places. If and only if this is the case, the <c>einstall</c>
63 + function can be used. It is usually necessary to include additional
64 + <c>dodoc</c> statements for the <c>README</c>, <c>ChangeLog</c>, etc
65 + in these cases:
66 </p>
67
68 <codesample lang="ebuild">
69 - einstall || die "einstall failed"
70 + einstall
71 + dodoc README CHANGES
72 </codesample>
73
74 -<p>
75 -It is usually necessary to include additional <c>dodoc</c> statements for the
76 -<c>README</c>, <c>ChangeLog</c>, etc in these cases.
77 -</p>
78 -
79 <note>
80 There is no need to <c>dodoc</c> <c>COPYING</c>! The license belongs
81 to <c>${PORTDIR}/licenses</c>. Sometimes though, you might want to
82 @@ -124,6 +125,7 @@ example.
83 <section>
84 <title>Trivial Installs</title>
85 <body>
86 +
87 <p>
88 For some packages with no <c>Makefile</c> that only install a small
89 number of files, writing a manual install using <c>cp</c> is the
90 @@ -138,58 +140,58 @@ compilation required) themes:
91
92 <p>
93 Or sometimes a combination of <c>insinto</c> and <c>doins</c> (plus related
94 -functions -- see Install Functions Reference) <d/> the following is based
95 +functions -- see <uri link="::function-reference/install-functions"/>) <d/> the following is based
96 upon the <c>sys-fs/udev</c> install:
97 </p>
98
99 <codesample lang="ebuild">
100 src_install() {
101 - dobin udevinfo || die
102 - dobin udevtest || die
103 + dobin udevinfo
104 + dobin udevtest
105 into /
106 - dosbin udev || die
107 - dosbin udevd || die
108 - dosbin udevsend || die
109 - dosbin udevstart || die
110 - dosbin extras/scsi_id/scsi_id || die
111 - dosbin extras/volume_id/udev_volume_id || die
112 + dosbin udev
113 + dosbin udevd
114 + dosbin udevsend
115 + dosbin udevstart
116 + dosbin extras/scsi_id/scsi_id
117 + dosbin extras/volume_id/udev_volume_id
118
119 exeinto /etc/udev/scripts
120 - doexe extras/ide-devfs.sh || die
121 - doexe extras/scsi-devfs.sh || die
122 - doexe extras/cdsymlinks.sh || die
123 - doexe extras/dvb.sh || die
124 + doexe extras/ide-devfs.sh
125 + doexe extras/scsi-devfs.sh
126 + doexe extras/cdsymlinks.sh
127 + doexe extras/dvb.sh
128
129 insinto /etc/udev
130 - newins "${FILESDIR}/udev.conf.post_050" udev.conf || die
131 - doins extras/cdsymlinks.conf || die
132 + newins "${FILESDIR}/udev.conf.post_050" udev.conf
133 + doins extras/cdsymlinks.conf
134
135 # For devfs style layout
136 insinto /etc/udev/rules.d/
137 - newins etc/udev/gentoo/udev.rules 50-udev.rules || die
138 + newins etc/udev/gentoo/udev.rules 50-udev.rules
139
140 # scsi_id configuration
141 insinto /etc
142 - doins extras/scsi_id/scsi_id.config || die
143 + doins extras/scsi_id/scsi_id.config
144
145 # set up symlinks in /etc/hotplug.d/default
146 - dodir /etc/hotplug.d/default || die
147 - dosym ../../../sbin/udevsend /etc/hotplug.d/default/10-udev.hotplug || die
148 + dodir /etc/hotplug.d/default
149 + dosym ../../../sbin/udevsend /etc/hotplug.d/default/10-udev.hotplug
150
151 # set up the /etc/dev.d directory tree
152 - dodir /etc/dev.d/default || die
153 - dodir /etc/dev.d/net || die
154 + dodir /etc/dev.d/default
155 + dodir /etc/dev.d/net
156 exeinto /etc/dev.d/net
157 - doexe etc/dev.d/net/hotplug.dev || die
158 + doexe etc/dev.d/net/hotplug.dev
159
160 - doman *.8 || die
161 - doman extras/scsi_id/scsi_id.8 || die
162 + doman *.8
163 + doman extras/scsi_id/scsi_id.8
164
165 - dodoc ChangeLog FAQ HOWTO-udev_for_dev README TODO || die
166 - dodoc docs/{overview,udev-OLS2003.pdf,udev_vs_devfs,RFC-dev.d,libsysfs.txt} || die
167 - dodoc docs/persistent_naming/* docs/writing_udev_rules/* || die
168 + dodoc ChangeLog FAQ HOWTO-udev_for_dev README TODO
169 + dodoc docs/{overview,udev-OLS2003.pdf,udev_vs_devfs,RFC-dev.d,libsysfs.txt}
170 + dodoc docs/persistent_naming/* docs/writing_udev_rules/*
171
172 - newdoc extras/volume_id/README README_volume_id || die
173 + newdoc extras/volume_id/README README_volume_id
174 }
175 </codesample>