]>
Commit | Line | Data |
---|---|---|
1 | ############################################################################### | |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = libdb | |
7 | version_major = 5 | |
8 | version_minor = 2 | |
9 | version_patch = 36 | |
10 | version = %{version_major}.%{version_minor}.%{version_patch} | |
11 | release = 1 | |
12 | thisapp = db-%{version} | |
13 | ||
14 | soversion = %{version_major}.%{version_minor} | |
15 | ||
16 | maintainer = Michael Tremer <michael.tremer@ipfire.org> | |
17 | groups = System/Libraries | |
18 | url = http://www.oracle.com/technology/products/berkeley-db/ | |
19 | license = Proprietary | |
20 | summary = Berkeley DB is a library that provides an embedded database. | |
21 | ||
22 | description | |
23 | Berkeley DB (BDB) is a computer software library that provides | |
24 | a high-performance embedded database. | |
25 | end | |
26 | ||
27 | source_dl = http://download.oracle.com/berkeley-db/ | |
28 | ||
29 | build | |
30 | requires | |
31 | chrpath | |
32 | gcc-c++ | |
33 | libtool | |
34 | perl | |
35 | end | |
36 | ||
37 | CFLAGS += -fno-strict-aliasing | |
38 | ||
39 | DIR_APP = %{DIR_SRC}/%{thisapp}/dist/dist-tls | |
40 | ||
41 | prepare_cmds | |
42 | mkdir %{DIR_APP} && cd %{DIR_APP} | |
43 | ln -s ../configure . | |
44 | end | |
45 | ||
46 | MACRO_FIX_LIBTOOL | |
47 | # Remove libtool predep_objects and postdep_objects wonkiness so that | |
48 | # building without -nostdlib doesn't include them twice. Because we | |
49 | # already link with g++, weird stuff happens if you don't let the | |
50 | # compiler handle this. | |
51 | perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool | |
52 | perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool | |
53 | perl -pi -e 's/-shared -nostdlib/-shared/' libtool | |
54 | end | |
55 | ||
56 | configure_options += \ | |
57 | -C \ | |
58 | --enable-compat185 \ | |
59 | --enable-cxx \ | |
60 | --enable-sql \ | |
61 | --disable-static \ | |
62 | --disable-rpath | |
63 | ||
64 | install_cmds | |
65 | # Remove RPATH in all binaries. | |
66 | for i in %{BUILDROOT}%{bindir}/*; do | |
67 | chrpath --delete ${i} | |
68 | done | |
69 | ||
70 | # Remove documentation which is very big. | |
71 | rm -rf %{BUILDROOT}%{datadir}/docs | |
72 | ||
73 | # Remove unversioned libs. | |
74 | rm -vf %{BUILDROOT}%{libdir}/libdb*-%{version_major}.so | |
75 | ||
76 | mkdir -pv %{BUILDROOT}%{includedir}/%{name} | |
77 | mv -v %{BUILDROOT}%{includedir}/*.h %{BUILDROOT}%{includedir}/%{name}/ | |
78 | for i in db.h db_cxx.h db_185.h; do | |
79 | ln -svf %{name}/${i} %{BUILDROOT}/%{includedir} | |
80 | done | |
81 | end | |
82 | end | |
83 | ||
84 | packages | |
85 | package %{name} | |
86 | ||
87 | package %{name}-devel | |
88 | template DEVEL | |
89 | ||
90 | files += !%{libdir}/libdb-%{soversion}.so | |
91 | files += !%{libdir}/libdb_sql-%{soversion}.so | |
92 | end | |
93 | ||
94 | package %{name}-utils | |
95 | summary = Command line tools for managing Berkeley DB (version 4) databases. | |
96 | description = %{summary} | |
97 | ||
98 | files | |
99 | /usr/bin | |
100 | end | |
101 | end | |
102 | ||
103 | package %{name}-cxx | |
104 | summary = The Berkeley DB database library (version 4) for C++. | |
105 | description = %{summary} | |
106 | ||
107 | files | |
108 | %{libdir}/libdb_cxx-%{soversion}.so | |
109 | end | |
110 | end | |
111 | ||
112 | package %{name}-debuginfo | |
113 | template DEBUGINFO | |
114 | end | |
115 | end |