1 |
wltjr 07/12/04 23:59:55 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: firebird-2.0.3.12981.0-r4.ebuild |
5 |
firebird-2.1.0.16780_beta2-r2.ebuild |
6 |
Removed: firebird-2.1.0.16780_beta2-r1.ebuild |
7 |
firebird-2.0.3.12981.0-r3.ebuild |
8 |
Log: |
9 |
Switched from patches to sed for path changes w/ sed checks via function. Moved core from /usr/share/firebird -> /usr/lib/firebird since it contains arch specific binaries, per FHS. Renamed isql -> fbsql per bug #198388. Fixed missing path tweak for bug #198540. Removed past versions, should be all folks :) |
10 |
(Portage version: 2.1.4_rc4) |
11 |
|
12 |
Revision Changes Path |
13 |
1.83 dev-db/firebird/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/ChangeLog?rev=1.83&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/ChangeLog?rev=1.83&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/ChangeLog?r1=1.82&r2=1.83 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v |
22 |
retrieving revision 1.82 |
23 |
retrieving revision 1.83 |
24 |
diff -u -r1.82 -r1.83 |
25 |
--- ChangeLog 12 Nov 2007 18:09:41 -0000 1.82 |
26 |
+++ ChangeLog 4 Dec 2007 23:59:54 -0000 1.83 |
27 |
@@ -1,6 +1,21 @@ |
28 |
# ChangeLog for dev-db/firebird |
29 |
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.82 2007/11/12 18:09:41 wltjr Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.83 2007/12/04 23:59:54 wltjr Exp $ |
32 |
+ |
33 |
+*firebird-2.1.0.16780_beta2-r2 (04 Dec 2007) |
34 |
+*firebird-2.0.3.12981.0-r4 (04 Dec 2007) |
35 |
+ |
36 |
+ 04 Dec 2007; William L. Thomson Jr. <wltjr@g.o> |
37 |
+ +files/firebird-2.1.0.16780_beta2-deps-flags-libs.patch, |
38 |
+ -files/firebird-2.1.0.16780_beta2-deps-flags-libs-paths.patch, |
39 |
+ +files/firebird.conf.d, -firebird-2.0.3.12981.0-r3.ebuild, |
40 |
+ +firebird-2.0.3.12981.0-r4.ebuild, -firebird-2.1.0.16780_beta2-r1.ebuild, |
41 |
+ +firebird-2.1.0.16780_beta2-r2.ebuild: |
42 |
+ Switched from patches to sed for path changes w/ sed checks via function. |
43 |
+ Moved core from /usr/share/firebird -> /usr/lib/firebird since it contains |
44 |
+ arch specific binaries, per FHS. Renamed isql -> fbsql per bug #198388. |
45 |
+ Fixed missing path tweak for bug #198540. Removed past versions, should be |
46 |
+ all folks :) |
47 |
|
48 |
12 Nov 2007; William L. Thomson Jr. <wltjr@g.o> |
49 |
-files/firebird.conf.d, -files/firebird.init.d, -files/firebird.xinetd, |
50 |
|
51 |
|
52 |
|
53 |
1.1 dev-db/firebird/firebird-2.0.3.12981.0-r4.ebuild |
54 |
|
55 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/firebird-2.0.3.12981.0-r4.ebuild?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/firebird-2.0.3.12981.0-r4.ebuild?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: firebird-2.0.3.12981.0-r4.ebuild |
59 |
=================================================================== |
60 |
# Copyright 1999-2007 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-2.0.3.12981.0-r4.ebuild,v 1.1 2007/12/04 23:59:54 wltjr Exp $ |
63 |
|
64 |
inherit flag-o-matic eutils autotools versionator |
65 |
|
66 |
MY_P=Firebird-$(replace_version_separator 4 -) |
67 |
|
68 |
DESCRIPTION="A relational database offering many ANSI SQL-99 features" |
69 |
HOMEPAGE="http://firebird.sourceforge.net/" |
70 |
SRC_URI="mirror://sourceforge/firebird/${MY_P}.tar.bz2 |
71 |
doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" |
72 |
|
73 |
LICENSE="Interbase-1.0" |
74 |
SLOT="0" |
75 |
KEYWORDS="~amd64 -ia64 ~x86" |
76 |
IUSE="doc xinetd examples debug" |
77 |
RESTRICT="userpriv" |
78 |
|
79 |
RDEPEND="dev-libs/libedit |
80 |
dev-libs/icu" |
81 |
DEPEND="${RDEPEND} |
82 |
doc? ( app-arch/unzip )" |
83 |
RDEPEND="${RDEPEND} |
84 |
xinetd? ( virtual/inetd )" |
85 |
|
86 |
S="${WORKDIR}/${MY_P}" |
87 |
|
88 |
pkg_setup() { |
89 |
enewgroup firebird 450 |
90 |
enewuser firebird 450 /bin/bash /usr/lib/firebird firebird |
91 |
} |
92 |
|
93 |
function check_sed() { |
94 |
MSG="sed of $3, required $2 lines modified $1" |
95 |
einfo "${MSG}" |
96 |
[[ $1 -ge $2 ]] || die "${MSG}" |
97 |
} |
98 |
|
99 |
src_unpack() { |
100 |
if use doc; then |
101 |
# Unpack docs |
102 |
mkdir "${WORKDIR}/manuals" |
103 |
cd "${WORKDIR}/manuals" |
104 |
unpack ib_b60_doc.zip |
105 |
cd "${WORKDIR}" |
106 |
fi |
107 |
|
108 |
unpack "${MY_P}.tar.bz2" |
109 |
|
110 |
# compile time relative path hacks, ew :( |
111 |
mkdir -p "${WORKDIR}/../etc" \ |
112 |
"${WORKDIR}/usr" \ |
113 |
"${WORKDIR}/var/log/firebird" \ |
114 |
"${WORKDIR}/var/run/firebird" |
115 |
cd "${WORKDIR}/usr"; ln -s "${S}/gen/firebird/bin" |
116 |
cd "${WORKDIR}/../etc"; ln -s "${S}/gen/firebird" firebird |
117 |
|
118 |
cd "${S}" |
119 |
|
120 |
epatch "${FILESDIR}/${P}-external-libs.patch" |
121 |
epatch "${FILESDIR}/${P}-flags.patch" |
122 |
epatch "${FILESDIR}/${P}-make-deps.patch" |
123 |
|
124 |
einfo "Split up Firebird via relative path hacks" |
125 |
# sed vs patch for portability and addtional location changes |
126 |
# based on FIREBIRD=/usr/lib/firebird |
127 |
check_sed "$(sed -i -e 's:"aliases.conf":"../../../etc/firebird/aliases.conf":w /dev/stdout' \ |
128 |
src/jrd/db_alias.cpp | wc -l )" "1" "src/jrd/db_alias.cpp" # 1 line |
129 |
check_sed "$(sed -i -e 's:"isc_event1:"../../../var/run/firebird/isc_event1:w /dev/stdout' \ |
130 |
-e 's:"isc_lock1:"../../../var/run/firebird/isc_lock1:w /dev/stdout' \ |
131 |
-e 's:"isc_init1:"../../../var/run/firebird/isc_init1:w /dev/stdout' \ |
132 |
-e 's:"isc_config:"../../../var/run/firebird/isc_config:w /dev/stdout' \ |
133 |
-e 's:"isc_guard1:"../../../var/run/firebird/isc_guard1:w /dev/stdout' \ |
134 |
-e 's:"firebird.log":"../../../var/log/firebird/firebird.log":w /dev/stdout' \ |
135 |
-e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
136 |
src/jrd/file_params.h | wc -l)" "14" "src/jrd/file_params.h" # 14 lines |
137 |
check_sed "$(sed -i -e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
138 |
src/jrd/jrd_pwd.h | wc -l)" "1" "src/jrd/jrd_pwd.h" # 1 line |
139 |
check_sed "$(sed -i -e 's:"firebird.conf":"../../../etc/firebird/firebird.conf":w /dev/stdout' \ |
140 |
src/jrd/os/config_root.h | wc -l)" "1" "src/jrd/os/config_root.h" # 1 line |
141 |
check_sed "$(sed -i -e 's:"bin/fb_cache_print":"../../../usr/bin/fb_cache_print":w /dev/stdout' \ |
142 |
-e 's:"bin/fb_lock_print":"../../../usr/bin/fb_lock_print":w /dev/stdout' \ |
143 |
-e 's:"bin/fb_cache_manager":"../../../usr/bin/fb_cache_manager":w /dev/stdout' \ |
144 |
-e 's:"bin/gstat":"../../../usr/bin/gstat":w /dev/stdout' \ |
145 |
-e 's:"bin/gbak":"../../../usr/bin/gbak":w /dev/stdout' \ |
146 |
-e 's:"bin/gdef":"../../../usr/bin/gdef":w /dev/stdout' \ |
147 |
-e 's:"bin/gsec":"../../../usr/bin/gsec":w /dev/stdout' \ |
148 |
-e 's:"bin/gjrn":"../../../usr/bin/gjrn":w /dev/stdout' \ |
149 |
-e 's:"bin/gfix":"../../../usr/bin/gfix":w /dev/stdout' \ |
150 |
src/jrd/svc.cpp | wc -l)" "26" "src/jrd/svc.cpp" # 26 lines |
151 |
check_sed "$(sed -i -e 's:"bin/fb_lock_mgr":"../../../usr/bin/fb_lock_mgr":w /dev/stdout' \ |
152 |
src/lock/lock.cpp | wc -l)" "1" "src/lock/lock.cpp" # 1 line |
153 |
check_sed "$(sed -i -e 's:m_Root_Path + "firebird.conf":"../../../etc/firebird/firebird.conf":w /dev/stdout' \ |
154 |
src/utilities/fbcpl/fbdialog.cpp | wc -l)" "1" "src/utilities/fbcpl/fbdialog.cpp" # 1 line |
155 |
check_sed "$(sed -i -e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
156 |
src/utilities/gsec/security.epp | wc -l)" "1" "src/utilities/gsec/security.epp" # 1 line |
157 |
check_sed "$(sed -i -e 's:"bin/fbserver":"../../../usr/bin/fbserver":w /dev/stdout' \ |
158 |
src/utilities/guard/guard.cpp | wc -l)" "1" "src/utilities/guard/guard.cpp" # 1 line |
159 |
check_sed "$(sed -i -e 's:"bin/fbguard":"../../../usr/bin/fbguard":w /dev/stdout' \ |
160 |
src/utilities/ibmgr/ibmgr.h | wc -l)" "1" "src/utilities/ibmgr/ibmgr.h" # 1 line |
161 |
check_sed "$(sed -i -e 's:$FIREBIRD/firebird.log:/var/log/firebird/firebird.log:w /dev/stdout' \ |
162 |
src/utilities/ibmgr/srvrmgr.cpp | wc -l)" "1" "src/utilities/ibmgr/srvrmgr.cpp" # 1 line |
163 |
|
164 |
# Rename references to isql to fbsql |
165 |
check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \ |
166 |
src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line |
167 |
check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ |
168 |
src/msgs/history.sql | wc -l)" "4" "src/msgs/history.sql" # 4 lines |
169 |
check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ |
170 |
-e 's:ISQL :FBSQL :w /dev/stdout' \ |
171 |
src/msgs/messages.sql | wc -l)" "4" "src/msgs/messages.sql" # 4 lines |
172 |
|
173 |
find "${S}" -name \*.sh -print0 | xargs -0 chmod +x |
174 |
rm -rf "${S}"/extern/{editline,icu} |
175 |
|
176 |
eautoreconf |
177 |
} |
178 |
|
179 |
src_compile() { |
180 |
filter-flags -fprefetch-loop-arrays |
181 |
filter-mfpmath sse |
182 |
|
183 |
econf --prefix=/usr/lib/firebird --with-editline \ |
184 |
$(use_enable !xinetd superserver) \ |
185 |
$(use_enable debug) \ |
186 |
${myconf} || die "econf failed" |
187 |
emake -j1 || die "error during make" |
188 |
} |
189 |
|
190 |
src_install() { |
191 |
cd "${S}/gen/firebird" |
192 |
|
193 |
# Seems to be ignored? |
194 |
insinto /usr/share/firebird/bin |
195 |
dobin bin/{changeRunUser,restoreRootRunUser,changeDBAPassword}.sh |
196 |
rm bin/*.sh || die "Could not remove *sh files" |
197 |
|
198 |
einfo "Renaming isql -> fbsql" |
199 |
mv bin/isql bin/fbsql |
200 |
|
201 |
insinto /usr/bin |
202 |
dobin bin/* |
203 |
|
204 |
insinto /usr/include |
205 |
doins include/* |
206 |
|
207 |
insinto /usr/lib |
208 |
dolib.so lib/*.so* |
209 |
dolib.a lib/*.a* |
210 |
|
211 |
insinto /usr/lib/firebird |
212 |
doins *.msg |
213 |
|
214 |
insinto /usr/lib/firebird/help |
215 |
doins help/help.fdb |
216 |
|
217 |
insinto /usr/share/firebird/upgrade |
218 |
doins "${S}"/src/misc/upgrade/v2/* |
219 |
|
220 |
insinto /etc/firebird |
221 |
insopts -m0644 -o firebird -g firebird |
222 |
doins misc/* |
223 |
doins ../install/misc/aliases.conf |
224 |
insopts -m0660 -o firebird -g firebird |
225 |
doins security2.fdb |
226 |
|
227 |
exeinto /usr/lib/firebird/UDF |
228 |
doexe UDF/*.so |
229 |
|
230 |
exeinto /usr/lib/firebird/intl |
231 |
newexe intl/libfbintl.so fbintl.so |
232 |
|
233 |
insinto /usr/lib/firebird/intl |
234 |
doins ../install/misc/fbintl.conf |
235 |
|
236 |
diropts -m 755 -o firebird -g firebird |
237 |
dodir /var/log/firebird |
238 |
dodir /var/run/firebird |
239 |
keepdir /var/log/firebird |
240 |
keepdir /var/run/firebird |
241 |
|
242 |
# create links for backwards compatibility |
243 |
cd "${D}/usr/lib" |
244 |
ln -s libfbclient.so libgds.so |
245 |
ln -s libfbclient.so libgds.so.0 |
246 |
ln -s libfbclient.so libfbclient.so.1 |
247 |
|
248 |
if use xinetd ; then |
249 |
insinto /etc/xinetd.d |
250 |
newins "${FILESDIR}/${PN}.xinetd.2" ${PN} || die "newins xinetd file failed" |
251 |
else |
252 |
newinitd "${FILESDIR}/${PN}.init.d.2" ${PN} |
253 |
newconfd "${FILESDIR}/firebird.conf.d" ${PN} |
254 |
fperms 640 /etc/conf.d/firebird |
255 |
fi |
256 |
doenvd "${FILESDIR}/70${PN}" |
257 |
|
258 |
# Install docs |
259 |
use doc && dodoc "${WORKDIR}"/manuals/* |
260 |
|
261 |
if use examples; then |
262 |
docinto examples |
263 |
dodoc examples/* |
264 |
fi |
265 |
} |
266 |
|
267 |
pkg_postinst() { |
268 |
# Hack to fix ownership/perms |
269 |
chown -fR firebird:firebird "${ROOT}/etc/firebird" "${ROOT}/usr/lib/firebird" |
270 |
chmod 750 "${ROOT}/etc/firebird" |
271 |
|
272 |
elog |
273 |
elog "Firebird is no longer installed in /opt. Binaries are in" |
274 |
elog "/usr/bin. The core, udfs, etc are in /usr/lib/firebird. Logs" |
275 |
elog "are in /var/log/firebird, and lock files in /var/run/firebird" |
276 |
elog "The command line tool isql has been renamed to fbsql." |
277 |
elog "Please report any problems or issues to bugs.gentoo.org." |
278 |
elog |
279 |
} |
280 |
|
281 |
pkg_config() { |
282 |
# if found /etc/security.gdb from previous install, backup, and restore as |
283 |
# /etc/security2.fdb |
284 |
if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then |
285 |
# if we have scurity2.fdb already, back it 1st |
286 |
if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then |
287 |
cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" |
288 |
fi |
289 |
gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" |
290 |
gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" |
291 |
mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" |
292 |
rm "${ROOT}/etc/firebird/security.gbk" |
293 |
|
294 |
# make sure they are readable only to firebird |
295 |
chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" |
296 |
chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" |
297 |
|
298 |
einfo |
299 |
einfo "Converted old security.gdb to security2.fdb, security.gdb has been " |
300 |
einfo "renamed to security.gdb.old. if you had previous security2.fdb, " |
301 |
einfo "it's backed to security2.fdb.old (all under ${ROOT}/etc/firebird)." |
302 |
einfo |
303 |
fi |
304 |
|
305 |
# we need to enable local access to the server |
306 |
if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then |
307 |
touch "${ROOT}/etc/hosts.equiv" |
308 |
chown root:0 "${ROOT}/etc/hosts.equiv" |
309 |
chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" |
310 |
fi |
311 |
|
312 |
# add 'localhost.localdomain' to the hosts.equiv file... |
313 |
if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
314 |
echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" |
315 |
einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv" |
316 |
fi |
317 |
|
318 |
# add 'localhost' to the hosts.equiv file... |
319 |
if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
320 |
echo "localhost" >> "${ROOT}/etc/hosts.equiv" |
321 |
einfo "Added localhost to ${ROOT}/etc/hosts.equiv" |
322 |
fi |
323 |
|
324 |
HS_NAME=`hostname` |
325 |
if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
326 |
echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" |
327 |
einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv" |
328 |
fi |
329 |
|
330 |
einfo "If you're using UDFs, please remember to move them" |
331 |
einfo "to /usr/lib/firebird/UDF" |
332 |
} |
333 |
|
334 |
|
335 |
|
336 |
1.1 dev-db/firebird/firebird-2.1.0.16780_beta2-r2.ebuild |
337 |
|
338 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/firebird-2.1.0.16780_beta2-r2.ebuild?rev=1.1&view=markup |
339 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/firebird/firebird-2.1.0.16780_beta2-r2.ebuild?rev=1.1&content-type=text/plain |
340 |
|
341 |
Index: firebird-2.1.0.16780_beta2-r2.ebuild |
342 |
=================================================================== |
343 |
# Copyright 1999-2007 Gentoo Foundation |
344 |
# Distributed under the terms of the GNU General Public License v2 |
345 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-2.1.0.16780_beta2-r2.ebuild,v 1.1 2007/12/04 23:59:54 wltjr Exp $ |
346 |
|
347 |
inherit flag-o-matic eutils autotools versionator |
348 |
|
349 |
#MY_P=Firebird-$(replace_version_separator 4 -) |
350 |
MY_P=Firebird-${PV/_b/-B} |
351 |
|
352 |
DESCRIPTION="A relational database offering many ANSI SQL-99 features" |
353 |
HOMEPAGE="http://firebird.sourceforge.net/" |
354 |
SRC_URI="mirror://sourceforge/firebird/${MY_P}.tar.bz2 |
355 |
doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" |
356 |
|
357 |
LICENSE="Interbase-1.0" |
358 |
SLOT="0" |
359 |
KEYWORDS="~amd64 -ia64 ~x86" |
360 |
IUSE="doc xinetd examples debug" |
361 |
RESTRICT="userpriv" |
362 |
|
363 |
RDEPEND="dev-libs/libedit |
364 |
dev-libs/icu" |
365 |
DEPEND="${RDEPEND} |
366 |
doc? ( app-arch/unzip )" |
367 |
RDEPEND="${RDEPEND} |
368 |
xinetd? ( virtual/inetd )" |
369 |
|
370 |
S="${WORKDIR}/${MY_P}" |
371 |
|
372 |
pkg_setup() { |
373 |
enewgroup firebird 450 |
374 |
enewuser firebird 450 /bin/bash /usr/lib/firebird firebird |
375 |
} |
376 |
|
377 |
function check_sed() { |
378 |
MSG="sed of $3, required $2 lines modified $1" |
379 |
einfo "${MSG}" |
380 |
[[ $1 -ge $2 ]] || die "${MSG}" |
381 |
} |
382 |
|
383 |
src_unpack() { |
384 |
if use doc; then |
385 |
# Unpack docs |
386 |
mkdir "${WORKDIR}/manuals" |
387 |
cd "${WORKDIR}/manuals" |
388 |
unpack ib_b60_doc.zip |
389 |
cd "${WORKDIR}" |
390 |
fi |
391 |
|
392 |
unpack "${MY_P}.tar.bz2" |
393 |
|
394 |
# compile time relative path hacks, ew :( |
395 |
mkdir -p "${WORKDIR}/../etc" \ |
396 |
"${WORKDIR}/usr" \ |
397 |
"${WORKDIR}/var/log/firebird" \ |
398 |
"${WORKDIR}/var/run/firebird" |
399 |
cd "${WORKDIR}/usr"; ln -s "${S}/gen/firebird/bin" |
400 |
cd "${WORKDIR}/../etc"; ln -s "${S}/gen/firebird" firebird |
401 |
|
402 |
cd "${S}" |
403 |
|
404 |
epatch "${FILESDIR}/${P}-deps-flags-libs.patch" |
405 |
|
406 |
einfo "Split up Firebird via relative path hacks" |
407 |
# sed vs patch for portability and addtional location changes |
408 |
# based on FIREBIRD=/usr/lib/firebird |
409 |
check_sed "$(sed -i -e 's:"aliases.conf":"../../../etc/firebird/aliases.conf":w /dev/stdout' \ |
410 |
src/jrd/db_alias.cpp | wc -l )" "1" "src/jrd/db_alias.cpp" # 1 line |
411 |
check_sed "$(sed -i -e 's:"isc_event1:"../../../var/run/firebird/isc_event1:w /dev/stdout' \ |
412 |
-e 's:"isc_lock1:"../../../var/run/firebird/isc_lock1:w /dev/stdout' \ |
413 |
-e 's:"isc_init1:"../../../var/run/firebird/isc_init1:w /dev/stdout' \ |
414 |
-e 's:"isc_guard1:"../../../var/run/firebird/isc_guard1:w /dev/stdout' \ |
415 |
-e 's:"isc_monitor1:"../../../var/run/firebird/isc_monitor1:w /dev/stdout' \ |
416 |
-e 's:"firebird.log":"../../../var/log/firebird/firebird.log":w /dev/stdout' \ |
417 |
-e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
418 |
src/jrd/file_params.h | wc -l)" "12" "src/jrd/file_params.h" # 12 lines |
419 |
check_sed "$(sed -i -e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
420 |
src/jrd/jrd_pwd.h | wc -l)" "1" "src/jrd/jrd_pwd.h" # 1 line |
421 |
check_sed "$(sed -i -e 's:"firebird.conf":"../../../etc/firebird/firebird.conf":w /dev/stdout' \ |
422 |
src/jrd/os/config_root.h | wc -l)" "1" "src/jrd/os/config_root.h" # 1 line |
423 |
check_sed "$(sed -i -e 's:"bin/fb_cache_print":"../../../usr/bin/fb_cache_print":w /dev/stdout' \ |
424 |
-e 's:"bin/fb_lock_print":"../../../usr/bin/fb_lock_print":w /dev/stdout' \ |
425 |
-e 's:"bin/fb_cache_manager":"../../../usr/bin/fb_cache_manager":w /dev/stdout' \ |
426 |
-e 's:"bin/gstat":"../../../usr/bin/gstat":w /dev/stdout' \ |
427 |
-e 's:"bin/gbak":"../../../usr/bin/gbak":w /dev/stdout' \ |
428 |
-e 's:"bin/gdef":"../../../usr/bin/gdef":w /dev/stdout' \ |
429 |
-e 's:"bin/gsec":"../../../usr/bin/gsec":w /dev/stdout' \ |
430 |
-e 's:"bin/gjrn":"../../../usr/bin/gjrn":w /dev/stdout' \ |
431 |
-e 's:"bin/gfix":"../../../usr/bin/gfix":w /dev/stdout' \ |
432 |
src/jrd/svc.cpp | wc -l)" "26" "src/jrd/svc.cpp" # 26 lines |
433 |
check_sed "$(sed -i -e 's:"bin/fb_lock_mgr":"../../../usr/bin/fb_lock_mgr":w /dev/stdout' \ |
434 |
src/lock/lock.cpp | wc -l)" "1" "src/lock/lock.cpp" # 1 line |
435 |
check_sed "$(sed -i -e 's:m_Root_Path + "firebird.conf":"../../../etc/firebird/firebird.conf":w /dev/stdout' \ |
436 |
src/utilities/fbcpl/fbdialog.cpp | wc -l)" "1" "src/utilities/fbcpl/fbdialog.cpp" # 1 line |
437 |
check_sed "$(sed -i -e 's:"security2.fdb":"../../../etc/firebird/security2.fdb":w /dev/stdout' \ |
438 |
src/utilities/gsec/security.epp | wc -l)" "1" "src/utilities/gsec/security.epp" # 1 line |
439 |
check_sed "$(sed -i -e 's:"bin/fbserver":"../../../usr/bin/fbserver":w /dev/stdout' \ |
440 |
src/utilities/guard/guard.cpp | wc -l)" "1" "src/utilities/guard/guard.cpp" # 1 line |
441 |
check_sed "$(sed -i -e 's:"bin/fbguard":"../../../usr/bin/fbguard":w /dev/stdout' \ |
442 |
src/utilities/ibmgr/ibmgr.h | wc -l)" "1" "src/utilities/ibmgr/ibmgr.h" # 1 line |
443 |
check_sed "$(sed -i -e 's:$FIREBIRD/firebird.log:/var/log/firebird/firebird.log:w /dev/stdout' \ |
444 |
src/utilities/ibmgr/srvrmgr.cpp | wc -l)" "1" "src/utilities/ibmgr/srvrmgr.cpp" # 1 line |
445 |
|
446 |
# Rename references to isql to fbsql |
447 |
check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \ |
448 |
src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line |
449 |
check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ |
450 |
src/msgs/history.sql | wc -l)" "4" "src/msgs/history.sql" # 4 lines |
451 |
check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ |
452 |
src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines |
453 |
check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ |
454 |
-e 's:ISQL :FBSQL :w /dev/stdout' \ |
455 |
src/msgs/messages.sql | wc -l)" "4" "src/msgs/messages.sql" # 4 lines |
456 |
check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \ |
457 |
-e 's:isql :fbsql :w /dev/stdout' \ |
458 |
-e 's:ISQL :FBSQL :w /dev/stdout' \ |
459 |
src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines |
460 |
|
461 |
find "${S}" -name \*.sh -print0 | xargs -0 chmod +x |
462 |
rm -rf "${S}"/extern/{editline,icu} |
463 |
|
464 |
eautoreconf |
465 |
} |
466 |
|
467 |
src_compile() { |
468 |
filter-flags -fprefetch-loop-arrays |
469 |
filter-mfpmath sse |
470 |
|
471 |
econf --prefix=/usr/lib/firebird --with-editline \ |
472 |
$(use_enable !xinetd superserver) \ |
473 |
$(use_enable debug) \ |
474 |
${myconf} || die "econf failed" |
475 |
emake -j1 || die "error during make" |
476 |
} |
477 |
|
478 |
src_install() { |
479 |
cd "${S}/gen/firebird" |
480 |
|
481 |
# Seems to be ignored? |
482 |
insinto /usr/share/firebird/bin |
483 |
dobin bin/{changeRunUser,restoreRootRunUser,changeDBAPassword}.sh |
484 |
rm bin/*.sh || die "Could not remove *sh files" |
485 |
|
486 |
einfo "Renaming isql -> fbsql" |
487 |
mv bin/isql bin/fbsql |
488 |
|
489 |
insinto /usr/bin |
490 |
dobin bin/* |
491 |
|
492 |
insinto /usr/include |
493 |
doins include/* |
494 |
|
495 |
insinto /usr/lib |
496 |
dolib.so lib/*.so* |
497 |
dolib.a lib/*.a* |
498 |
|
499 |
insinto /usr/lib/firebird |
500 |
doins *.msg |
501 |
|
502 |
insinto /usr/lib/firebird/help |
503 |
doins help/help.fdb |
504 |
|
505 |
insinto /usr/share/firebird/upgrade |
506 |
doins "${S}"/src/misc/upgrade/v2/* |
507 |
|
508 |
insinto /etc/firebird |
509 |
insopts -m0644 -o firebird -g firebird |
510 |
doins misc/* |
511 |
doins ../install/misc/aliases.conf |
512 |
insopts -m0660 -o firebird -g firebird |
513 |
doins security2.fdb |
514 |
|
515 |
exeinto /usr/lib/firebird/UDF |
516 |
doexe UDF/*.so |
517 |
|
518 |
exeinto /usr/lib/firebird/intl |
519 |
newexe intl/libfbintl.so fbintl.so |
520 |
|
521 |
insinto /usr/lib/firebird/intl |
522 |
doins ../install/misc/fbintl.conf |
523 |
|
524 |
diropts -m 755 -o firebird -g firebird |
525 |
dodir /var/log/firebird |
526 |
dodir /var/run/firebird |
527 |
keepdir /var/log/firebird |
528 |
keepdir /var/run/firebird |
529 |
|
530 |
# create links for backwards compatibility |
531 |
cd "${D}/usr/lib" |
532 |
ln -s libfbclient.so libgds.so |
533 |
ln -s libfbclient.so libgds.so.0 |
534 |
ln -s libfbclient.so libfbclient.so.1 |
535 |
|
536 |
if use xinetd ; then |
537 |
insinto /etc/xinetd.d |
538 |
newins "${FILESDIR}/${PN}.xinetd.2" ${PN} || die "newins xinetd file failed" |
539 |
else |
540 |
newinitd "${FILESDIR}/${PN}.init.d.2" ${PN} |
541 |
newconfd "${FILESDIR}/firebird.conf.d" ${PN} |
542 |
fperms 640 /etc/conf.d/firebird |
543 |
fi |
544 |
doenvd "${FILESDIR}/70${PN}" |
545 |
|
546 |
# Install docs |
547 |
use doc && dodoc "${WORKDIR}"/manuals/* |
548 |
|
549 |
if use examples; then |
550 |
docinto examples |
551 |
dodoc examples/* |
552 |
fi |
553 |
} |
554 |
|
555 |
pkg_postinst() { |
556 |
# Hack to fix ownership/perms |
557 |
chown -fR firebird:firebird "${ROOT}/etc/firebird" "${ROOT}/usr/lib/firebird" |
558 |
chmod 750 "${ROOT}/etc/firebird" |
559 |
|
560 |
elog |
561 |
elog "Firebird is no longer installed in /opt. Binaries are in" |
562 |
elog "/usr/bin. The core, udfs, etc are in /usr/lib/firebird. Logs" |
563 |
elog "are in /var/log/firebird, and lock files in /var/run/firebird" |
564 |
elog "The command line tool isql has been renamed to fbsql." |
565 |
elog "Please report any problems or issues to bugs.gentoo.org." |
566 |
elog |
567 |
} |
568 |
|
569 |
pkg_config() { |
570 |
# if found /etc/security.gdb from previous install, backup, and restore as |
571 |
# /etc/security2.fdb |
572 |
if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then |
573 |
# if we have scurity2.fdb already, back it 1st |
574 |
if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then |
575 |
cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" |
576 |
fi |
577 |
gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" |
578 |
gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" |
579 |
mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" |
580 |
rm "${ROOT}/etc/firebird/security.gbk" |
581 |
|
582 |
# make sure they are readable only to firebird |
583 |
chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" |
584 |
chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" |
585 |
|
586 |
einfo |
587 |
einfo "Converted old security.gdb to security2.fdb, security.gdb has been " |
588 |
einfo "renamed to security.gdb.old. if you had previous security2.fdb, " |
589 |
einfo "it's backed to security2.fdb.old (all under ${ROOT}/etc/firebird)." |
590 |
einfo |
591 |
fi |
592 |
|
593 |
# we need to enable local access to the server |
594 |
if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then |
595 |
touch "${ROOT}/etc/hosts.equiv" |
596 |
chown root:0 "${ROOT}/etc/hosts.equiv" |
597 |
chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" |
598 |
fi |
599 |
|
600 |
# add 'localhost.localdomain' to the hosts.equiv file... |
601 |
if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
602 |
echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" |
603 |
einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv" |
604 |
fi |
605 |
|
606 |
# add 'localhost' to the hosts.equiv file... |
607 |
if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
608 |
echo "localhost" >> "${ROOT}/etc/hosts.equiv" |
609 |
einfo "Added localhost to ${ROOT}/etc/hosts.equiv" |
610 |
fi |
611 |
|
612 |
HS_NAME=`hostname` |
613 |
if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then |
614 |
echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" |
615 |
einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv" |
616 |
fi |
617 |
|
618 |
einfo "If you're using UDFs, please remember to move them" |
619 |
einfo "to /usr/lib/firebird/UDF" |
620 |
} |
621 |
|
622 |
|
623 |
|
624 |
-- |
625 |
gentoo-commits@g.o mailing list |