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