1 |
commit: 9b00135f4696e539a3cbee711ac687f4f9ded105 |
2 |
Author: William L. Thomson Jr <wlt <AT> o-sinc <DOT> com> |
3 |
AuthorDate: Sun Oct 4 21:44:18 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 5 16:53:56 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b00135f |
7 |
|
8 |
dev-db/firebird: Various syntax improvements and fixes |
9 |
|
10 |
With second batch of fixes by Michał Górny. |
11 |
|
12 |
Pull-Request: https://github.com/gentoo/gentoo/pull/154 |
13 |
|
14 |
...-r2.ebuild => firebird-2.5.3.26780.0-r3.ebuild} | 83 +++++++++++----------- |
15 |
1 file changed, 40 insertions(+), 43 deletions(-) |
16 |
|
17 |
diff --git a/dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild b/dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild |
18 |
similarity index 76% |
19 |
rename from dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild |
20 |
rename to dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild |
21 |
index 281bae6..6b824a6 100644 |
22 |
--- a/dev-db/firebird/firebird-2.5.3.26780.0-r2.ebuild |
23 |
+++ b/dev-db/firebird/firebird-2.5.3.26780.0-r3.ebuild |
24 |
@@ -4,7 +4,7 @@ |
25 |
|
26 |
EAPI=5 |
27 |
|
28 |
-inherit flag-o-matic eutils autotools multilib user readme.gentoo versionator |
29 |
+inherit autotools eutils flag-o-matic multilib readme.gentoo user versionator |
30 |
|
31 |
MY_P=${PN/f/F}-$(replace_version_separator 4 -) |
32 |
#MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate} |
33 |
@@ -13,18 +13,14 @@ DESCRIPTION="A relational database offering many ANSI SQL:2003 and some SQL:2008 |
34 |
HOMEPAGE="http://www.firebirdsql.org/" |
35 |
SRC_URI=" |
36 |
mirror://sourceforge/firebird/${MY_P}.tar.bz2 |
37 |
- doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" |
38 |
+ doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" |
39 |
|
40 |
LICENSE="IDPL Interbase-1.0" |
41 |
SLOT="0" |
42 |
-KEYWORDS="~amd64 -ia64 ~x86" |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
|
45 |
-IUSE="doc client superserver xinetd examples debug" |
46 |
-REQUIRED_USE=" |
47 |
- client? ( !superserver ) |
48 |
- client? ( !xinetd ) |
49 |
- superserver? ( !xinetd ) |
50 |
-" |
51 |
+IUSE="debug doc client examples superserver xinetd" |
52 |
+REQUIRED_USE="^^ ( client superserver xinetd )" |
53 |
|
54 |
CDEPEND=" |
55 |
dev-libs/libedit |
56 |
@@ -45,10 +41,10 @@ S="${WORKDIR}/${MY_P}" |
57 |
|
58 |
pkg_setup() { |
59 |
enewgroup firebird 450 |
60 |
- enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird |
61 |
+ enewuser firebird 450 /bin/sh /usr/$(get_libdir)/firebird firebird |
62 |
} |
63 |
|
64 |
-function check_sed() { |
65 |
+check_sed() { |
66 |
MSG="sed of $3, required $2 lines modified $1" |
67 |
einfo "${MSG}" |
68 |
[[ $1 -ge $2 ]] || die "${MSG}" |
69 |
@@ -58,7 +54,8 @@ src_unpack() { |
70 |
unpack "${MY_P}.tar.bz2" |
71 |
if use doc; then |
72 |
# Unpack docs |
73 |
- mkdir "${WORKDIR}/manuals" && cd "${WORKDIR}/manuals" || die |
74 |
+ mkdir "manuals" || die |
75 |
+ cd "manuals" || die |
76 |
unpack ib_b60_doc.zip |
77 |
fi |
78 |
} |
79 |
@@ -82,8 +79,8 @@ src_prepare() { |
80 |
-e 's:ISQL :FBSQL :w /dev/stdout' \ |
81 |
src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines |
82 |
|
83 |
- find "${S}" -name \*.sh -print0 | xargs -0 chmod +x || die |
84 |
- rm -rf "${S}"/extern/{btyacc,editline,icu} || die |
85 |
+ find "${S}" -name \*.sh -exec chmod +x {} + || die |
86 |
+ rm -r "${S}"/extern/{btyacc,editline,icu} || die |
87 |
|
88 |
eautoreconf |
89 |
} |
90 |
@@ -94,7 +91,7 @@ src_configure() { |
91 |
|
92 |
econf \ |
93 |
--prefix=/usr/$(get_libdir)/firebird \ |
94 |
- $(use_enable superserver superserver) \ |
95 |
+ $(use_enable superserver) \ |
96 |
$(use_enable debug) \ |
97 |
--with-editline \ |
98 |
--with-system-editline \ |
99 |
@@ -126,7 +123,7 @@ src_compile() { |
100 |
} |
101 |
|
102 |
src_install() { |
103 |
- cd "${S}/gen/${PN}" || die |
104 |
+ cd "gen/${PN}" || die |
105 |
|
106 |
if use doc; then |
107 |
dodoc "${S}"/doc/*.pdf |
108 |
@@ -135,7 +132,7 @@ src_install() { |
109 |
|
110 |
doheader include/* |
111 |
|
112 |
- rm lib/libfbstatic.a |
113 |
+ rm lib/libfbstatic.a || die "failed to remove libfbstatic.a" |
114 |
|
115 |
insinto /usr/$(get_libdir) |
116 |
dolib.so lib/*.so* |
117 |
@@ -151,10 +148,10 @@ src_install() { |
118 |
use client && return |
119 |
|
120 |
einfo "Renaming isql -> fbsql" |
121 |
- mv bin/isql bin/fbsql |
122 |
+ mv bin/isql bin/fbsql || die "failed to rename isql -> fbsql" |
123 |
|
124 |
local bins="fbsql fbsvcmgr fbtracemgr gbak gdef gfix gpre gsec gstat nbackup qli" |
125 |
- for bin in ${bins[@]}; do |
126 |
+ for bin in ${bins}; do |
127 |
dobin bin/${bin} |
128 |
done |
129 |
|
130 |
@@ -170,7 +167,7 @@ src_install() { |
131 |
dosbin bin/{fbguard,fb_smp_server} |
132 |
|
133 |
#Temp should not be necessary, need to patch/fix |
134 |
- dosym "${D}"/usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so |
135 |
+ dosym usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so |
136 |
fi |
137 |
|
138 |
exeinto /usr/bin/${PN} |
139 |
@@ -182,18 +179,18 @@ src_install() { |
140 |
|
141 |
exeinto /usr/$(get_libdir)/firebird/intl |
142 |
dolib.so intl/libfbintl.so |
143 |
- dosym "${D}"/usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl |
144 |
- dosym "${D}"/etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf |
145 |
+ dosym usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl |
146 |
+ dosym etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf |
147 |
|
148 |
exeinto /usr/$(get_libdir)/${PN}/plugins |
149 |
dolib.so plugins/libfbtrace.so |
150 |
- dosym "${D}"/usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so |
151 |
+ dosym usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so |
152 |
|
153 |
exeinto /usr/$(get_libdir)/${PN}/UDF |
154 |
doexe UDF/*.so |
155 |
|
156 |
insinto /usr/share/${PN}/upgrade |
157 |
- doins "${S}"/src/misc/upgrade/v2/* |
158 |
+ doins -r "${S}"/src/misc/upgrade/v2/* |
159 |
|
160 |
insinto /etc/${PN} |
161 |
insopts -m0644 -o firebird -g firebird |
162 |
@@ -236,19 +233,19 @@ pkg_config() { |
163 |
|
164 |
# if found /etc/security.gdb from previous install, backup, and restore as |
165 |
# /etc/security2.fdb |
166 |
- if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then |
167 |
+ if [[ -f "${ROOT}/etc/firebird/security.gdb" ]] ; then |
168 |
# if we have scurity2.fdb already, back it 1st |
169 |
- if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then |
170 |
- cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" |
171 |
+ if [[ -f "${ROOT}/etc/firebird/security2.fdb" ]] ; then |
172 |
+ cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" || die |
173 |
fi |
174 |
- gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" |
175 |
- gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" |
176 |
- mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" |
177 |
- rm "${ROOT}/etc/firebird/security.gbk" |
178 |
+ gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" || die |
179 |
+ gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" || die |
180 |
+ mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" || die |
181 |
+ rm "${ROOT}/etc/firebird/security.gbk" || die |
182 |
|
183 |
# make sure they are readable only to firebird |
184 |
- chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" |
185 |
- chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" |
186 |
+ chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" || die |
187 |
+ chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" || die |
188 |
|
189 |
echo |
190 |
einfo "Converted old security.gdb to security2.fdb, security.gdb has been " |
191 |
@@ -258,27 +255,27 @@ pkg_config() { |
192 |
fi |
193 |
|
194 |
# we need to enable local access to the server |
195 |
- if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then |
196 |
- touch "${ROOT}/etc/hosts.equiv" |
197 |
- chown root:0 "${ROOT}/etc/hosts.equiv" |
198 |
- chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" |
199 |
+ if [[ ! -f "${ROOT}/etc/hosts.equiv" ]] ; then |
200 |
+ touch "${ROOT}/etc/hosts.equiv" || die |
201 |
+ chown root:0 "${ROOT}/etc/hosts.equiv" || die |
202 |
+ chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" || die |
203 |
fi |
204 |
|
205 |
# add 'localhost.localdomain' to the hosts.equiv file... |
206 |
- if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
207 |
- echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" |
208 |
+ if grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" ; then |
209 |
+ echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" || die |
210 |
einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv" |
211 |
fi |
212 |
|
213 |
# add 'localhost' to the hosts.equiv file... |
214 |
- if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
215 |
- echo "localhost" >> "${ROOT}/etc/hosts.equiv" |
216 |
+ if grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" ; then |
217 |
+ echo "localhost" >> "${ROOT}/etc/hosts.equiv" || die |
218 |
einfo "Added localhost to ${ROOT}/etc/hosts.equiv" |
219 |
fi |
220 |
|
221 |
HS_NAME=`hostname` |
222 |
- if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
223 |
- echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" |
224 |
+ if grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" ; then |
225 |
+ echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" || die |
226 |
einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv" |
227 |
fi |