Fixed license declaration at spec file
[platform/upstream/gdbm.git] / packaging / gdbm.spec
1 %define keepstatic 1
2
3 Name:           gdbm
4 %define lname   libgdbm
5 Url:            http://directory.fsf.org/GNU/gdbm.html
6 Version:        1.11
7 Release:        0
8 License:        GPL-3.0+
9 Summary:        GNU dbm key/data database
10 Group:          System/Libraries
11 Source:         ftp://prep.ai.mit.edu/gnu/gdbm/gdbm-%{version}.tar.gz
12 Source2:        baselibs.conf
13 Source1001:     gdbm.manifest
14 BuildRequires:  libtool
15
16 %description
17 GNU dbm is a library of database functions that use extensible
18 hashing and work similar to the standard UNIX dbm. These routines are
19 provided to a programmer needing to create and manipulate a hashed
20 database.
21
22 The basic use of GDBM is to store key/data pairs in a data file. Each
23 key must be unique and each key is paired with only one data item.
24
25 The library provides primitives for storing key/data pairs, searching
26 and retrieving the data by its key and deleting a key along with its
27 data. It also supports sequential iteration over all key/data pairs in
28 a database.
29
30 For compatibility with programs using old UNIX dbm functions, the
31 package also provides traditional dbm and ndbm interfaces.
32
33 %package -n %lname
34 Summary:        GNU dbm key/data database
35 Group:          System/Libraries
36 Obsoletes:      gdbm < %{version}-%{release}
37 Provides:       gdbm = %{version}-%{release}
38
39 %description -n %lname
40 GNU dbm is a library of database functions that use extensible
41 hashing and work similar to the standard UNIX dbm. These routines are
42 provided to a programmer needing to create and manipulate a hashed
43 database.
44
45 The basic use of GDBM is to store key/data pairs in a data file. Each
46 key must be unique and each key is paired with only one data item.
47
48 The library provides primitives for storing key/data pairs, searching
49 and retrieving the data by its key and deleting a key along with its
50 data. It also supports sequential iteration over all key/data pairs in
51 a database.
52
53 For compatibility with programs using old UNIX dbm functions, the
54 package also provides traditional dbm and ndbm interfaces.
55
56 %package devel
57 Summary:        Include Files and Libraries mandatory for Development
58 Group:          System/Libraries
59 Requires:       gdbm = %{version}
60 Provides:       gdbm:/usr/lib/libgdbm.so
61
62 %description devel
63 This package contains all necessary include files and libraries needed
64 to develop applications that require these.
65
66 %prep
67 %setup -q
68 cp %{SOURCE1001} .
69
70 %build
71 export CFLAGS="%{optflags} -Wa,--noexecstack"
72 %configure --enable-libgdbm-compat --disable-nls
73 %__make %{?_smp_mflags};
74
75 %install
76 %make_install
77 echo "/* GNU ld script
78    Use the shared library, but some functions are only in
79    the static library, so try that secondarily.  */
80 GROUP ( %{_libdir}/libgdbm.so %{_libdir}/libgdbm_compat.so )" > %{buildroot}/%{_libdir}/libndbm.so
81 echo "/* GNU ld script
82    Use the shared library, but some functions are only in
83    the static library, so try that secondarily.  */
84 GROUP ( %{_libdir}/libgdbm.a %{_libdir}/libgdbm_compat.a )" > %{buildroot}/%{_libdir}/libndbm.a
85
86 %post -n %lname -p /sbin/ldconfig
87
88 %postun -n %lname -p /sbin/ldconfig
89
90 %files -n  %lname
91 %manifest %{name}.manifest
92 %defattr(-,root,root)
93 %license COPYING
94 %{_bindir}/gdbm_dump
95 %{_bindir}/gdbm_load
96 %{_bindir}/gdbmtool
97 %{_libdir}/libgdbm.so.4
98 %{_libdir}/libgdbm.so.4.0.0
99 %{_libdir}/libgdbm_compat.so.4
100 %{_libdir}/libgdbm_compat.so.4.0.0
101
102 %files devel
103 %manifest %{name}.manifest
104 %defattr(-,root,root)
105 %{_includedir}/dbm.h
106 %{_includedir}/gdbm.h
107 %{_includedir}/ndbm.h
108 %{_infodir}/gdbm.info.gz
109 %{_libdir}/libgdbm.a
110 %{_libdir}/libgdbm.so
111 %{_libdir}/libgdbm_compat.a
112 %{_libdir}/libgdbm_compat.so
113 %{_libdir}/libndbm.a
114 %{_libdir}/libndbm.so
115 %{_mandir}/man3/gdbm.3.gz
116 %{_mandir}/man1/gdbm_dump.1.gz
117 %{_mandir}/man1/gdbm_load.1.gz
118 %{_mandir}/man1/gdbmtool.1.gz