]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - libdb/libdb.nm
pdns: Update to version 3.4.7
[people/amarx/ipfire-3.x.git] / libdb / libdb.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = libdb
7 version_major = 5
8 version_minor = 3
9 version_patch = 28
10 version = %{version_major}.%{version_minor}.%{version_patch}
11 release = 1
12 thisapp = db-%{version}
13
14 soversion = %{version_major}.%{version_minor}
15
16 maintainer = Michael Tremer <michael.tremer@ipfire.org>
17 groups = System/Libraries
18 url = http://www.oracle.com/technology/products/berkeley-db/
19 license = Proprietary
20 summary = Berkeley DB is a library that provides an embedded database.
21
22 description
23 Berkeley DB (BDB) is a computer software library that provides
24 a high-performance embedded database.
25 end
26
27 source_dl = http://download.oracle.com/berkeley-db/
28
29 build
30 requires
31 automake
32 chrpath
33 gcc-c++
34 libtool
35 perl
36 zlib-devel
37 end
38
39 CFLAGS += -fno-strict-aliasing
40
41 DIR_APP = %{DIR_SRC}/%{thisapp}/dist/dist-tls
42
43 prepare_cmds
44 for i in $(find %{DIR_SRC}/%{thisapp} -name config.guess -or -name config.sub); do
45 cp -vf %{datadir}/automake-*/config.{guess,sub} $(dirname ${i})
46 done
47
48 mkdir -pv %{DIR_APP} && cd %{DIR_APP}
49 ln -svf ../configure .
50 end
51
52 MACRO_FIX_LIBTOOL
53 # Remove libtool predep_objects and postdep_objects wonkiness so that
54 # building without -nostdlib doesn't include them twice. Because we
55 # already link with g++, weird stuff happens if you don't let the
56 # compiler handle this.
57 perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
58 perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
59 perl -pi -e 's/-shared -nostdlib/-shared/' libtool
60 end
61
62 configure_options += \
63 -C \
64 --enable-compat185 \
65 --enable-cxx \
66 --enable-sql \
67 --disable-static \
68 --disable-rpath
69
70 install_cmds
71 # Remove RPATH in all binaries.
72 for i in %{BUILDROOT}%{bindir}/*; do
73 chrpath --delete ${i}
74 done
75
76 # Remove documentation which is very big.
77 rm -rf %{BUILDROOT}%{prefix}/docs
78
79 # Remove unversioned libs.
80 rm -vf %{BUILDROOT}%{libdir}/libdb*-%{version_major}.so
81
82 mkdir -pv %{BUILDROOT}%{includedir}/%{name}
83 mv -v %{BUILDROOT}%{includedir}/*.h %{BUILDROOT}%{includedir}/%{name}/
84 for i in db.h db_cxx.h db_185.h; do
85 ln -svf %{name}/${i} %{BUILDROOT}/%{includedir}
86 done
87 end
88 end
89
90 packages
91 package %{name}
92
93 package %{name}-devel
94 template DEVEL
95
96 # You cannot install libdb-devel and db4-devel
97 # at the same time.
98 conflicts
99 db4-devel
100 end
101
102 files += !%{libdir}/libdb-%{soversion}.so
103 files += !%{libdir}/libdb_sql-%{soversion}.so
104 end
105
106 package %{name}-utils
107 summary = Command line tools for managing Berkeley DB (version 4) databases.
108 description = %{summary}
109
110 files
111 /usr/bin
112 end
113 end
114
115 package %{name}-cxx
116 summary = The Berkeley DB database library (version 4) for C++.
117 description = %{summary}
118
119 files
120 %{libdir}/libdb_cxx-%{soversion}.so
121 end
122 end
123
124 package %{name}-debuginfo
125 template DEBUGINFO
126 end
127 end