]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - compat-db/compat-db.nm
icecream: Remove package
[people/amarx/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
MT
8# Release cannot be reset because the sub-packages won't get updated
9release = 6
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
30versions = %{version_db52} %{version_db48} %{version_db47} %{version_db46}
31main_version:= %{version_db52}
04fc14b1
MT
32
33source_dl = http://download.oracle.com/berkeley-db/
ffd22a7b
MT
34sources = db-%{version_db52}.tar.gz
35sources += db-%{version_db48}.tar.gz
36sources += db-%{version_db47}.tar.gz
04fc14b1
MT
37sources += db-%{version_db46}.tar.gz
38
39build
40 requires
41 gcc-c++
42 end
43
44 CFLAGS += -fno-strict-aliasing
ffd22a7b 45 CFLAGS += -Wno-format
04fc14b1
MT
46
47 configure_options += \
48 --enable-compat185 \
49 --enable-cxx \
50 --disable-static
51
52 build
53 for version in %{versions}; do
54 cd %{DIR_SRC}/db-${version}/build_unix
55 ../dist/configure \
56 %{configure_options}
57
58 %{MACRO_FIX_LIBTOOL}
59
60 make %{PARALLELISMFLAGS}
61 done
62 end
63
64 install
65 for version in %{versions}; do
66 cd %{DIR_SRC}/db-${version}/build_unix
67 make install DESTDIR=%{BUILDROOT} \
68 docdir=%{datadir}/doc/db-${version}
69
70 # Remove unversioned libs.
ffd22a7b 71 rm -vf %{BUILDROOT}%{libdir}/libdb*-{5,4}.so
04fc14b1
MT
72
73 # Move binaries.
74 tag=$(echo ${version} | cut -c1,3)
75 for bin in %{BUILDROOT}%{bindir}/*db_*; do
76 t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
77 mv -v ${bin} ${t}
78 done
79
80 # Move libs.
81 major=$(echo ${version} | cut -c1-3)
82 mkdir -pv %{BUILDROOT}%{libdir}/db${version}
83 pushd %{BUILDROOT}%{libdir}/db${version}
84 ln -svf ../libdb-${major}.so libdb.so
85 ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
86 popd
87 rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
88
89 # Move headers.
ffd22a7b 90 mkdir -pv %{BUILDROOT}%{includedir}/db-${version}
04fc14b1 91 mv -v %{BUILDROOT}%{includedir}/*.h \
ffd22a7b 92 %{BUILDROOT}%{includedir}/db-${version}/
04fc14b1
MT
93
94 # Remove documentation.
95 rm -rf %{BUILDROOT}%{datadir}/doc
96 done
97 end
98end
99
100packages
101 package %{name}
ffd22a7b
MT
102 requires
103 compat-db52 = %{version_db52}-%{_release}
104 compat-db48 = %{version_db48}-%{_release}
105 compat-db47 = %{version_db47}-%{_release}
106 compat-db46 = %{version_db46}-%{_release}
107 end
04fc14b1 108 end
ffd22a7b 109
04fc14b1
MT
110 template COMPATDB
111 version = %{version_db%{version_tag}}
112
113 summary = The Berkeley DB database %{version} compatibility library.
114 description
115 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
116 embedded database support for both traditional and client/server applications.
117
118 This package contains Berkeley DB library version %{version} used for compatibility.
119 end
120
121 files
122 %{bindir}/berkeley_db%{version_tag}_*
123 %{bindir}/db%{version_tag}_*
124 %{libdir}/db%{version}
125 %{libdir}/libdb*-%{version_major}.so
126 end
127
04fc14b1
MT
128 obsoletes
129 db4 < 1:%{version_major}
130 db4-devel < 1:%{version_major}
131 db4-cxx < 1:%{version_major}
132 db4-utils < 1:%{version_major}
ffd22a7b
MT
133
134 libdb < %{version_major}
135 end
136
137 conflicts
138 libdb = %{version_major}
04fc14b1
MT
139 end
140 end
141
ffd22a7b
MT
142 package %{name}52
143 template COMPATDB
144
145 version_tag = 52
146 version_major = 5.2
147 end
148
149 package %{name}48
150 template COMPATDB
151
152 version_tag = 48
153 version_major = 4.8
154 end
155
04fc14b1
MT
156 package %{name}47
157 template COMPATDB
158
159 version_tag = 47
160 version_major = 4.7
161 end
162
163 package %{name}46
164 template COMPATDB
165
166 version_tag = 46
167 version_major = 4.6
168 end
169
170 package %{name}-headers
171 summary = The Berkeley DB database compatibility headers.
172 description
173 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
174 embedded database support for both traditional and client/server applications.
175
176 This package contains Berkeley DB library headers used for compatibility.
177 end
178 arch = noarch
179
180 files = %{includedir}
ffd22a7b
MT
181
182 requires
183 compat-db = %{main_version}-%{_release}
184 end
04fc14b1
MT
185 end
186
187 package %{name}-debuginfo
188 template DEBUGINFO
189 end
190end