]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - compat-db/compat-db.nm
paxctl: Update to 0.8.
[people/ms/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 = 5
9 thisapp = db-%{version}
10
11 maintainer = Michael Tremer <michael.tremer@ipfire.org>
12 groups = System/Libraries
13 url = http://www.oracle.com/technology/products/berkeley-db/
14 license = Proprietary
15 summary = The Berkeley DB database compatibility library.
16
17 description
18 Berkeley DB (BDB) is a computer software library that provides
19 a high-performance embedded database.
20
21 This package contains various version that were used in the
22 past. Some software may depend on them though.
23 end
24
25 version_db46 = 4.6.21
26 version_db47 = 4.7.25
27 versions = %{version_db47} %{version_db46}
28 main_version:= %{version_db47}
29
30 source_dl = http://download.oracle.com/berkeley-db/
31 sources = db-%{version_db47}.tar.gz
32 sources += db-%{version_db46}.tar.gz
33
34 build
35 requires
36 gcc-c++
37 end
38
39 CFLAGS += -fno-strict-aliasing
40
41 configure_options += \
42 --enable-compat185 \
43 --enable-cxx \
44 --disable-static
45
46 build
47 for version in %{versions}; do
48 cd %{DIR_SRC}/db-${version}/build_unix
49 ../dist/configure \
50 %{configure_options}
51
52 %{MACRO_FIX_LIBTOOL}
53
54 make %{PARALLELISMFLAGS}
55 done
56 end
57
58 install
59 for version in %{versions}; do
60 cd %{DIR_SRC}/db-${version}/build_unix
61 make install DESTDIR=%{BUILDROOT} \
62 docdir=%{datadir}/doc/db-${version}
63
64 # Remove unversioned libs.
65 rm -vf %{BUILDROOT}%{libdir}/libdb*-4.so
66
67 # Move binaries.
68 tag=$(echo ${version} | cut -c1,3)
69 for bin in %{BUILDROOT}%{bindir}/*db_*; do
70 t=$(echo ${bin} | sed "s/db_/db${tag}_/g")
71 mv -v ${bin} ${t}
72 done
73
74 # Move libs.
75 major=$(echo ${version} | cut -c1-3)
76 mkdir -pv %{BUILDROOT}%{libdir}/db${version}
77 pushd %{BUILDROOT}%{libdir}/db${version}
78 ln -svf ../libdb-${major}.so libdb.so
79 ln -svf ../libdb_cxx-${major}.so libdb_cxx.so
80 popd
81 rm -vf %{BUILDROOT}%{libdir}/libdb{,_cxx}.so
82
83 # Move headers.
84 mkdir -pv %{BUILDROOT}%{includedir}/db${version}
85 mv -v %{BUILDROOT}%{includedir}/*.h \
86 %{BUILDROOT}%{includedir}/db${version}/
87
88 # Remove documentation.
89 rm -rf %{BUILDROOT}%{datadir}/doc
90 done
91 end
92 end
93
94 packages
95 package %{name}
96 requires += compat-db46 = %{version_db46}-%{_release}
97 requires += compat-db47 = %{version_db47}-%{_release}
98 end
99
100 template COMPATDB
101 version = %{version_db%{version_tag}}
102
103 summary = The Berkeley DB database %{version} compatibility library.
104 description
105 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
106 embedded database support for both traditional and client/server applications.
107
108 This package contains Berkeley DB library version %{version} used for compatibility.
109 end
110
111 files
112 %{bindir}/berkeley_db%{version_tag}_*
113 %{bindir}/db%{version_tag}_*
114 %{libdir}/db%{version}
115 %{libdir}/libdb*-%{version_major}.so
116 end
117
118 requires = compat-db-headers = %{main_version}-%{_release}
119 obsoletes
120 db4 < 1:%{version_major}
121 db4-devel < 1:%{version_major}
122 db4-cxx < 1:%{version_major}
123 db4-utils < 1:%{version_major}
124 end
125 end
126
127 package %{name}47
128 template COMPATDB
129
130 version_tag = 47
131 version_major = 4.7
132 end
133
134 package %{name}46
135 template COMPATDB
136
137 version_tag = 46
138 version_major = 4.6
139 end
140
141 package %{name}-headers
142 summary = The Berkeley DB database compatibility headers.
143 description
144 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
145 embedded database support for both traditional and client/server applications.
146
147 This package contains Berkeley DB library headers used for compatibility.
148 end
149 arch = noarch
150
151 files = %{includedir}
152 end
153
154 package %{name}-debuginfo
155 template DEBUGINFO
156 end
157 end