]> git.ipfire.org Git - ipfire-3.x.git/blame - compat-db/compat-db.nm
clamav: Update to 0.101.4
[ipfire-3.x.git] / compat-db / compat-db.nm
CommitLineData
04fc14b1
MT
1###############################################################################
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
4###############################################################################
5
6name = compat-db
20ec0afc 7version = %{main_version}
ffd22a7b 8# Release cannot be reset because the sub-packages won't get updated
8433559d 9release = 9
04fc14b1
MT
10thisapp = db-%{version}
11
12maintainer = Michael Tremer <michael.tremer@ipfire.org>
13groups = System/Libraries
14url = http://www.oracle.com/technology/products/berkeley-db/
15license = Proprietary
16summary = The Berkeley DB database compatibility library.
17
18description
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.
24end
25
26version_db46 = 4.6.21
27version_db47 = 4.7.25
ffd22a7b
MT
28version_db48 = 4.8.30
29version_db52 = 5.2.36
972881e6
MT
30version_db53 = 5.3.28
31versions = %{version_db53} %{version_db52} %{version_db48} %{version_db47} %{version_db46}
32main_version:= %{version_db53}
04fc14b1
MT
33
34source_dl = http://download.oracle.com/berkeley-db/
972881e6
MT
35sources = db-%{version_db53}.tar.gz
36sources += db-%{version_db52}.tar.gz
ffd22a7b
MT
37sources += db-%{version_db48}.tar.gz
38sources += db-%{version_db47}.tar.gz
04fc14b1
MT
39sources += db-%{version_db46}.tar.gz
40
41build
42 requires
43 gcc-c++
44 end
45
46 CFLAGS += -fno-strict-aliasing
ffd22a7b 47 CFLAGS += -Wno-format
04fc14b1
MT
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.
ffd22a7b 73 rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
04fc14b1
MT
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.
ffd22a7b 92 mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
04fc14b1 93 mv -v %{BUILDROOT}%{includedir}/*.h \
ffd22a7b 94 %{BUILDROOT}%{includedir}/db-${version}/
8433559d
MT
95 ln -svf --relative \
96 %{BUILDROOT}%{includedir}/db-${version} \
97 %{BUILDROOT}%{includedir}/db-${major}
04fc14b1
MT
98
99 # Remove documentation.
100 rm -rf %{BUILDROOT}%{datadir}/doc
101 done
8433559d
MT
102
103 # Link latest headers into /usr/include
104 for file in %{BUILDROOT}%{includedir}/db-%{main_version}/*.h; do
105 ln -svf --relative ${file} %{BUILDROOT}%{includedir}/
106 done
04fc14b1
MT
107 end
108end
109
110packages
111 package %{name}
ffd22a7b 112 requires
972881e6 113 compat-db53 = %{version_db53}-%{_release}
ffd22a7b
MT
114 compat-db52 = %{version_db52}-%{_release}
115 compat-db48 = %{version_db48}-%{_release}
116 compat-db47 = %{version_db47}-%{_release}
117 compat-db46 = %{version_db46}-%{_release}
118 end
04fc14b1 119 end
ffd22a7b 120
04fc14b1
MT
121 template COMPATDB
122 version = %{version_db%{version_tag}}
123
124 summary = The Berkeley DB database %{version} compatibility library.
125 description
126 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
127 embedded database support for both traditional and client/server applications.
128
129 This package contains Berkeley DB library version %{version} used for compatibility.
130 end
131
132 files
133 %{bindir}/berkeley_db%{version_tag}_*
134 %{bindir}/db%{version_tag}_*
135 %{libdir}/db%{version}
136 %{libdir}/libdb*-%{version_major}.so
137 end
138
04fc14b1
MT
139 obsoletes
140 db4 < 1:%{version_major}
141 db4-devel < 1:%{version_major}
142 db4-cxx < 1:%{version_major}
143 db4-utils < 1:%{version_major}
ffd22a7b 144
8433559d 145 libdb <= %{version_major}
ffd22a7b
MT
146 end
147
148 conflicts
149 libdb = %{version_major}
04fc14b1
MT
150 end
151 end
152
972881e6
MT
153 package %{name}53
154 template COMPATDB
155
156 version_tag = 53
157 version_major = 5.3
158 end
159
ffd22a7b
MT
160 package %{name}52
161 template COMPATDB
162
163 version_tag = 52
164 version_major = 5.2
165 end
166
167 package %{name}48
168 template COMPATDB
169
170 version_tag = 48
171 version_major = 4.8
172 end
173
04fc14b1
MT
174 package %{name}47
175 template COMPATDB
176
177 version_tag = 47
178 version_major = 4.7
179 end
180
181 package %{name}46
182 template COMPATDB
183
184 version_tag = 46
185 version_major = 4.6
186 end
187
188 package %{name}-headers
189 summary = The Berkeley DB database compatibility headers.
190 description
191 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
192 embedded database support for both traditional and client/server applications.
193
194 This package contains Berkeley DB library headers used for compatibility.
195 end
04fc14b1
MT
196
197 files = %{includedir}
ffd22a7b
MT
198
199 requires
200 compat-db = %{main_version}-%{_release}
201 end
8433559d
MT
202
203 provides
204 libdb-devel = %{version_db53}
205 libdb-devel = %{version_db52}
206 db4-devel = %{version_db48}
207 db4-devel = %{version_db47}
208 db4-devel = %{version_db46}
209 end
210
211 conflicts
212 libdb-devel
213 end
04fc14b1
MT
214 end
215
216 package %{name}-debuginfo
217 template DEBUGINFO
218 end
219end