Moved these packages into Fedora.
[fedora-mingw.git] / gdbm / mingw32-gdbm.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-gdbm
8 Version:        1.8.0
9 Release:        1%{?dist}
10 Summary:        MinGW port of GNU database routines
11
12 License:        GPLv2+
13 Group:          Development/Libraries
14 URL:            http://www.gnu.org/software/gdbm/
15 Source0:        ftp://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 Patch0:         gdbm-1.8.0-jbj.patch
19 Patch1:         gdbm-1.8.0-fhs.patch
20 Patch2:         gdbm-1.8.0-cflags.patch
21 Patch3:         gdbm-1.8.0-64offset.patch
22
23 Patch100:       mingw32-gdbm-1.8.0-windows.patch
24
25 BuildArch:      noarch
26
27 BuildRequires:  mingw32-filesystem >= 26
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30
31 BuildRequires:  libtool
32
33
34 %description
35 Gdbm is a GNU database indexing library, including routines which use
36 extensible hashing.  Gdbm works in a similar way to standard UNIX dbm
37 routines.  Gdbm is useful for developers who write C applications and
38 need access to a simple and efficient database or who are building C
39 applications which will use such a database.
40
41 This is the MinGW Windows port of the libraries and development tools.
42
43
44 %prep
45 %setup -q -n gdbm-%{version}
46 %patch0 -p 1 -b .jbj
47 %patch1 -p 1 -b .fhs
48 %patch2 -p 1 -b .cflags
49 %patch3 -p1 -b .offset
50
51 %patch100 -p1 -b .windows
52
53
54 %build
55 libtoolize --force --copy
56 aclocal
57 autoreconf
58 %{_mingw32_configure}
59 make libdir=%{_mingw32_libdir} all progs
60
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 make prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} install
65
66 # Install the binaries.  Arguable whether we really want these.
67 install conv2gdbm.exe tdbm.exe testdbm.exe testgdbm.exe testndbm.exe tndbm.exe \
68   $RPM_BUILD_ROOT%{_mingw32_bindir}
69
70 # Native Fedora package seems to fluff this, but as far as I
71 # can tell they are trying to create <gdbm/gdbm.h> which
72 # links to <gdbm.h>.
73 pushd $RPM_BUILD_ROOT%{_mingw32_includedir}
74 mkdir gdbm
75 cd gdbm
76 ln -s ../gdbm.h
77 popd
78
79 # Remove the static library.
80 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libgdbm.a
81
82 # Remove man page and info file which duplicate what is in native package.
83 rm -r $RPM_BUILD_ROOT%{_mingw32_prefix}/man
84 rm -r $RPM_BUILD_ROOT%{_mingw32_prefix}/info
85
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90
91 %files
92 %defattr(-,root,root)
93 %{_mingw32_bindir}/conv2gdbm.exe
94 %{_mingw32_bindir}/tdbm.exe
95 %{_mingw32_bindir}/testdbm.exe
96 %{_mingw32_bindir}/testgdbm.exe
97 %{_mingw32_bindir}/testndbm.exe
98 %{_mingw32_bindir}/tndbm.exe
99 %{_mingw32_bindir}/libgdbm-2.dll
100 %{_mingw32_libdir}/libgdbm.dll.a
101 %{_mingw32_libdir}/libgdbm.la
102 %{_mingw32_includedir}/gdbm.h
103 %{_mingw32_includedir}/gdbm
104
105
106 %changelog
107 * Fri Oct  3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.0-1
108 - Initial RPM release.