EAPI=5
-inherit flag-o-matic eutils autotools multilib user readme.gentoo versionator
+inherit autotools eutils flag-o-matic multilib readme.gentoo user versionator
MY_P=${PN/f/F}-$(replace_version_separator 4 -)
#MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate}
HOMEPAGE="http://www.firebirdsql.org/"
SRC_URI="
mirror://sourceforge/firebird/${MY_P}.tar.bz2
- doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )"
+ doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )"
LICENSE="IDPL Interbase-1.0"
SLOT="0"
-KEYWORDS="~amd64 -ia64 ~x86"
+KEYWORDS="~amd64 ~x86"
-IUSE="doc client superserver xinetd examples debug"
-REQUIRED_USE="
- client? ( !superserver )
- client? ( !xinetd )
- superserver? ( !xinetd )
-"
+IUSE="debug doc client examples superserver xinetd"
+REQUIRED_USE="^^ ( client superserver xinetd )"
CDEPEND="
dev-libs/libedit
pkg_setup() {
enewgroup firebird 450
- enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird
+ enewuser firebird 450 /bin/sh /usr/$(get_libdir)/firebird firebird
}
-function check_sed() {
+check_sed() {
MSG="sed of $3, required $2 lines modified $1"
einfo "${MSG}"
[[ $1 -ge $2 ]] || die "${MSG}"
unpack "${MY_P}.tar.bz2"
if use doc; then
# Unpack docs
- mkdir "${WORKDIR}/manuals" && cd "${WORKDIR}/manuals" || die
+ mkdir "manuals" || die
+ cd "manuals" || die
unpack ib_b60_doc.zip
fi
}
-e 's:ISQL :FBSQL :w /dev/stdout' \
src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
- find "${S}" -name \*.sh -print0 | xargs -0 chmod +x || die
- rm -rf "${S}"/extern/{btyacc,editline,icu} || die
+ find "${S}" -name \*.sh -exec chmod +x {} + || die
+ rm -r "${S}"/extern/{btyacc,editline,icu} || die
eautoreconf
}
econf \
--prefix=/usr/$(get_libdir)/firebird \
- $(use_enable superserver superserver) \
+ $(use_enable superserver) \
$(use_enable debug) \
--with-editline \
--with-system-editline \
}
src_install() {
- cd "${S}/gen/${PN}" || die
+ cd "gen/${PN}" || die
if use doc; then
dodoc "${S}"/doc/*.pdf
doheader include/*
- rm lib/libfbstatic.a
+ rm lib/libfbstatic.a || die "failed to remove libfbstatic.a"
insinto /usr/$(get_libdir)
dolib.so lib/*.so*
use client && return
einfo "Renaming isql -> fbsql"
- mv bin/isql bin/fbsql
+ mv bin/isql bin/fbsql || die "failed to rename isql -> fbsql"
local bins="fbsql fbsvcmgr fbtracemgr gbak gdef gfix gpre gsec gstat nbackup qli"
- for bin in ${bins[@]}; do
+ for bin in ${bins}; do
dobin bin/${bin}
done
dosbin bin/{fbguard,fb_smp_server}
#Temp should not be necessary, need to patch/fix
- dosym "${D}"/usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so
+ dosym usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so
fi
exeinto /usr/bin/${PN}
exeinto /usr/$(get_libdir)/firebird/intl
dolib.so intl/libfbintl.so
- dosym "${D}"/usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl
- dosym "${D}"/etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf
+ dosym usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl
+ dosym etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf
exeinto /usr/$(get_libdir)/${PN}/plugins
dolib.so plugins/libfbtrace.so
- dosym "${D}"/usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so
+ dosym usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so
exeinto /usr/$(get_libdir)/${PN}/UDF
doexe UDF/*.so
insinto /usr/share/${PN}/upgrade
- doins "${S}"/src/misc/upgrade/v2/*
+ doins -r "${S}"/src/misc/upgrade/v2/*
insinto /etc/${PN}
insopts -m0644 -o firebird -g firebird
# if found /etc/security.gdb from previous install, backup, and restore as
# /etc/security2.fdb
- if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then
+ if [[ -f "${ROOT}/etc/firebird/security.gdb" ]] ; then
# if we have scurity2.fdb already, back it 1st
- if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then
- cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old"
+ if [[ -f "${ROOT}/etc/firebird/security2.fdb" ]] ; then
+ cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" || die
fi
- gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk"
- gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb"
- mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old"
- rm "${ROOT}/etc/firebird/security.gbk"
+ gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" || die
+ gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" || die
+ mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" || die
+ rm "${ROOT}/etc/firebird/security.gbk" || die
# make sure they are readable only to firebird
- chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}"
- chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}"
+ chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" || die
+ chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" || die
echo
einfo "Converted old security.gdb to security2.fdb, security.gdb has been "
fi
# we need to enable local access to the server
- if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then
- touch "${ROOT}/etc/hosts.equiv"
- chown root:0 "${ROOT}/etc/hosts.equiv"
- chmod u=rw,go=r "${ROOT}/etc/hosts.equiv"
+ if [[ ! -f "${ROOT}/etc/hosts.equiv" ]] ; then
+ touch "${ROOT}/etc/hosts.equiv" || die
+ chown root:0 "${ROOT}/etc/hosts.equiv" || die
+ chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" || die
fi
# add 'localhost.localdomain' to the hosts.equiv file...
- if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
- echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv"
+ if grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" ; then
+ echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" || die
einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv"
fi
# add 'localhost' to the hosts.equiv file...
- if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
- echo "localhost" >> "${ROOT}/etc/hosts.equiv"
+ if grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" ; then
+ echo "localhost" >> "${ROOT}/etc/hosts.equiv" || die
einfo "Added localhost to ${ROOT}/etc/hosts.equiv"
fi
HS_NAME=`hostname`
- if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
- echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv"
+ if grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" ; then
+ echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" || die
einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv"
fi