]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - compat-db/compat-db.nm
compat-db: Add compatibility for libdb-5.3
[people/amarx/ipfire-3.x.git] / compat-db / compat-db.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = compat-db
7 version = %{main_version}
8 # Release cannot be reset because the sub-packages won't get updated
9 release = 7
10 thisapp = db-%{version}
11
12 maintainer = Michael Tremer <michael.tremer@ipfire.org>
13 groups = System/Libraries
14 url = http://www.oracle.com/technology/products/berkeley-db/
15 license = Proprietary
16 summary = The Berkeley DB database compatibility library.
17
18 description
19 Berkeley DB (BDB) is a computer software library that provides
20 a high-performance embedded database.
21
22 This package contains various version that were used in the
23 past. Some software may depend on them though.
24 end
25
26 version_db46 = 4.6.21
27 version_db47 = 4.7.25
28 version_db48 = 4.8.30
29 version_db52 = 5.2.36
30 version_db53 = 5.3.28
31 versions = %{version_db53} %{version_db52} %{version_db48} %{version_db47} %{version_db46}
32 main_version:= %{version_db53}
33
34 source_dl = http://download.oracle.com/berkeley-db/
35 sources = db-%{version_db53}.tar.gz
36 sources += db-%{version_db52}.tar.gz
37 sources += db-%{version_db48}.tar.gz
38 sources += db-%{version_db47}.tar.gz
39 sources += db-%{version_db46}.tar.gz
40
41 build
42 requires
43 gcc-c++
44 end
45
46 CFLAGS += -fno-strict-aliasing
47 CFLAGS += -Wno-format
48
49 configure_options += \
50 --enable-compat185 \
51 --enable-cxx \
52 --disable-static
53
54 build
55 for version in %{versions}; do
56 cd %{DIR_SRC}/db-${version}/build_unix
57 ../dist/configure \
58 %{configure_options}
59
60 %{MACRO_FIX_LIBTOOL}
61
62 make %{PARALLELISMFLAGS}
63 done
64 end
65
66 install
67 for version in %{versions}; do
68 cd %{DIR_SRC}/db-${version}/build_unix
69 make install DESTDIR=%{BUILDROOT} \
70 docdir=%{datadir}/doc/db-${version}
71
72 # Remove unversioned libs.
73 rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
74
75 # Move binaries.
76 tag=$(echo ${version} | cut -c1,3)
77 for bin in %{BUILDROOT}%{bindir}/*db_*; do
78 t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
79 mv -v ${bin} ${t}
80 done
81
82 # Move libs.
83 major=$(echo ${version} | cut -c1-3)
84 mkdir -pv %{BUILDROOT}%{libdir}/db${version}
85 pushd %{BUILDROOT}%{libdir}/db${version}
86 ln -svf ../libdb-${major}.so libdb.so
87 ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
88 popd
89 rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
90
91 # Move headers.
92 mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
93 mv -v %{BUILDROOT}%{includedir}/*.h \
94 %{BUILDROOT}%{includedir}/db-${version}/
95
96 # Remove documentation.
97 rm -rf %{BUILDROOT}%{datadir}/doc
98 done
99 end
100 end
101
102 packages
103 package %{name}
104 requires
105 compat-db53 = %{version_db53}-%{_release}
106 compat-db52 = %{version_db52}-%{_release}
107 compat-db48 = %{version_db48}-%{_release}
108 compat-db47 = %{version_db47}-%{_release}
109 compat-db46 = %{version_db46}-%{_release}
110 end
111 end
112
113 template COMPATDB
114 version = %{version_db%{version_tag}}
115
116 summary = The Berkeley DB database %{version} compatibility library.
117 description
118 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
119 embedded database support for both traditional and client/server applications.
120
121 This package contains Berkeley DB library version %{version} used for compatibility.
122 end
123
124 files
125 %{bindir}/berkeley_db%{version_tag}_*
126 %{bindir}/db%{version_tag}_*
127 %{libdir}/db%{version}
128 %{libdir}/libdb*-%{version_major}.so
129 end
130
131 obsoletes
132 db4 < 1:%{version_major}
133 db4-devel < 1:%{version_major}
134 db4-cxx < 1:%{version_major}
135 db4-utils < 1:%{version_major}
136
137 libdb < %{version_major}
138 end
139
140 conflicts
141 libdb = %{version_major}
142 end
143 end
144
145 package %{name}53
146 template COMPATDB
147
148 version_tag = 53
149 version_major = 5.3
150 end
151
152 package %{name}52
153 template COMPATDB
154
155 version_tag = 52
156 version_major = 5.2
157 end
158
159 package %{name}48
160 template COMPATDB
161
162 version_tag = 48
163 version_major = 4.8
164 end
165
166 package %{name}47
167 template COMPATDB
168
169 version_tag = 47
170 version_major = 4.7
171 end
172
173 package %{name}46
174 template COMPATDB
175
176 version_tag = 46
177 version_major = 4.6
178 end
179
180 package %{name}-headers
181 summary = The Berkeley DB database compatibility headers.
182 description
183 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
184 embedded database support for both traditional and client/server applications.
185
186 This package contains Berkeley DB library headers used for compatibility.
187 end
188 arch = noarch
189
190 files = %{includedir}
191
192 requires
193 compat-db = %{main_version}-%{_release}
194 end
195 end
196
197 package %{name}-debuginfo
198 template DEBUGINFO
199 end
200 end