ipfire-3.x/libdb/libdb.nm

142 lines
3.4 KiB
Plaintext

###############################################################################
# IPFire.org - An Open Source Firewall Solution #
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
name = libdb
version_major = 6
version_minor = 1
version_patch = 26
version = %{version_major}.%{version_minor}.%{version_patch}
release = 5
thisapp = db-%{version}
soversion = %{version_major}.%{version_minor}
maintainer = Michael Tremer <michael.tremer@ipfire.org>
groups = System/Libraries
url = http://www.oracle.com/technology/products/berkeley-db/
license = Proprietary
summary = Berkeley DB is a library that provides an embedded database.
description
Berkeley DB (BDB) is a computer software library that provides
a high-performance embedded database.
end
source_dl = http://download.oracle.com/berkeley-db/
build
requires
automake
gcc-c++
libtool
patchelf
perl
zlib-devel
end
CFLAGS += -fno-strict-aliasing
DIR_APP = %{DIR_SRC}/%{thisapp}/dist/dist-tls
prepare_cmds
for i in $(find %{DIR_SRC}/%{thisapp} -name config.guess -or -name config.sub); do
cp -vf %{datadir}/automake-*/config.{guess,sub} $(dirname ${i})
done
mkdir -pv %{DIR_APP} && cd %{DIR_APP}
ln -svf ../configure .
end
MACRO_FIX_LIBTOOL
# Remove libtool predep_objects and postdep_objects wonkiness so that
# building without -nostdlib doesn't include them twice. Because we
# already link with g++, weird stuff happens if you don't let the
# compiler handle this.
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
perl -pi -e 's/-shared -nostdlib/-shared/' libtool
end
configure_options += \
-C \
--enable-compat185 \
--enable-cxx \
--enable-sql \
--disable-static \
--disable-rpath \
STRIP=:
install_cmds
# Remove RPATH in all binaries.
for i in %{BUILDROOT}%{bindir}/*; do
patchelf --remove-rpath ${i}
done
# Remove documentation which is very big.
rm -rf %{BUILDROOT}%{prefix}/docs
# Remove unversioned libs.
rm -vf %{BUILDROOT}%{libdir}/libdb*-%{version_major}.so
mkdir -pv %{BUILDROOT}%{includedir}/%{name}
mv -v %{BUILDROOT}%{includedir}/*.h %{BUILDROOT}%{includedir}/%{name}/
for i in db.h db_cxx.h db_185.h; do
ln -svf %{name}/${i} %{BUILDROOT}/%{includedir}
done
# Fix binary permissions.
find %{BUILDROOT}%{bindir} -type f -executable \
-exec chmod 755 {} \;
# Fix header permissions.
find %{BUILDROOT}%{includedir} -type f -iname "*.h" \
-exec chmod 644 {} \;
end
end
packages
package %{name}
package %{name}-devel
template DEVEL
obsoletes
compat-db-headers
end
# You cannot install libdb-devel and db4-devel
# at the same time.
conflicts
compat-db-headers
db4-devel
end
files += !%{libdir}/libdb-%{soversion}.so
files += !%{libdir}/libdb_sql-%{soversion}.so
end
package %{name}-utils
summary = Command line tools for managing Berkeley DB (version 4) databases.
description = %{summary}
files
/usr/bin
end
end
package %{name}-cxx
summary = The Berkeley DB database library (version 4) for C++.
description = %{summary}
files
%{libdir}/libdb_cxx-%{soversion}.so
end
end
package %{name}-debuginfo
template DEBUGINFO
end
end