]> git.pld-linux.org Git - SPECS.git/blob - mdbtools.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / mdbtools.spec
1 #
2 # Conditional build:
3 %bcond_without  gnome   # without gui package
4 %bcond_without  odbc    # without odbc package
5 #
6 Summary:        Several utilities for using MS-Access .mdb files
7 Summary(pl.UTF-8):      Zbiór narzędzi do używania plików MS-Access (.mdb)
8 Name:           mdbtools
9 Version:        0.7.1
10 Release:        4
11 License:        LGPL v2+ (library), GPL v2+ (gmdb2)
12 Group:          Development/Tools
13 Source0:        https://github.com/brianb/mdbtools/archive/0.7.1/%{name}-%{version}.tar.gz
14 # Source0-md5:  477c7af98e75f8e6c987b020d6a822d8
15 Source1:        gmdb2.desktop
16 Source2:        gmdb2.png
17 Patch0:         %{name}-pc.patch
18 URL:            http://mdbtools.sourceforge.net/
19 BuildRequires:  autoconf >= 2.50
20 BuildRequires:  automake
21 BuildRequires:  bison
22 BuildRequires:  flex
23 BuildRequires:  glib2-devel >= 2.0.0
24 %{?with_gnome:BuildRequires:    gtk+2-devel >= 2:2.14}
25 %{?with_gnome:BuildRequires:    libglade2-devel >= 2.0.0}
26 %{?with_gnome:BuildRequires:    libgnomeui-devel >= 2.0.0}
27 BuildRequires:  libtool >= 2:2
28 BuildRequires:  pkgconfig
29 BuildRequires:  readline-devel
30 BuildRequires:  txt2man
31 %{?with_odbc:BuildRequires:     unixODBC-devel >= 2.0.0}
32 Requires:       %{name}-libs = %{version}-%{release}
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _includedir     %{_prefix}/include/mdb
36
37 %description
38 - mdb-dump - simple hex dump utility for looking at mdb files
39 - mdb-schema - prints DDL for the specified table
40 - mdb-export - export table to CSV format
41 - mdb-tables - a simple dump of table names to be used with shell
42   scripts
43 - mdb-header - generates a C header to be used in exporting mdb data
44   to a C program
45 - mdb-parsecsv - generates a C program given a CSV file made with
46   mdb-export
47 - mdb-sql - demo SQL engine program
48
49 %description -l pl.UTF-8
50 - mdb-dump - proste narzędzie do robienia szesnastkowych zrzutów baz,
51   służące do oglądania plików mdb
52 - mdb-schema - wypisuje DDL dla podanej tabeli
53 - mdb-export - eksportuje tabelę do formatu CSV
54 - mdb-tables - prosty zrzut nazw tabel do używania w skryptach powłoki
55 - mdb-header - generuje nagłówki C, do używania przy eksportowaniu
56   danych mdb do programu w C
57 - mdb-parsecsv - generuje program w C na podstawie pliki CSV
58   zrobionego przy użyciu mdb-export
59 - mdb-sql - program demonstracyjny silnika SQL
60
61 %package libs
62 Summary:        Shared libraries for mdbtools
63 Summary(pl.UTF-8):      Biblioteki współdzielone mdbtools
64 Group:          Libraries
65 Conflicts:      mdbtools < 0.6-0.pre1.3
66
67 %description libs
68 Shared libraries for mdbtools.
69
70 %description libs -l pl.UTF-8
71 Biblioteki współdzielone mdbtools.
72
73 %package devel
74 Summary:        Header files for mdb library
75 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki mdb
76 Group:          Development/Libraries
77 Requires:       %{name}-libs = %{version}-%{release}
78
79 %description devel
80 Header files for mdb library.
81
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe biblioteki mdb.
84
85 %package static
86 Summary:        Static mdb library
87 Summary(pl.UTF-8):      Statyczna biblioteka mdb
88 Group:          Development/Libraries
89 Requires:       %{name}-devel = %{version}-%{release}
90
91 %description static
92 Static mdb library.
93
94 %description static -l pl.UTF-8
95 Statyczna biblioteka mdb.
96
97 %package odbc
98 Summary:        MDB Tools ODBC driver for unixODBC
99 Summary(pl.UTF-8):      Sterownik ODBC do MDB dla unixODBC
100 Group:          Libraries
101 Requires:       %{name} = %{version}-%{release}
102 Requires:       unixODBC >= 2.0.0
103
104 %description odbc
105 MDB Tools ODBC driver for unixODBC.
106
107 %description odbc -l pl.UTF-8
108 Sterownik ODBC do MDB dla unixODBC.
109
110 %package gui
111 Summary:        gmdb2 - graphical interface for MDB Tools
112 Summary(pl.UTF-8):      gmdb2 - graficzny interfejs do narzędzi MDB
113 Group:          Applications/Databases
114 Requires:       %{name} = %{version}-%{release}
115 Requires:       gtk+2 >= 2:2.14
116 Requires:       libglade2 >= 2.0.0
117 Requires:       libgnomeui >= 2.0.0
118
119 %description gui
120 gmdb2 - graphical interface for MDB Tools.
121
122 %description gui -l pl.UTF-8
123 gmdb2 - graficzny interfejs do narzędzi MDB.
124
125 %prep
126 %setup -q
127 %patch0 -p1
128
129 %build
130 %{__libtoolize}
131 %{__aclocal}
132 %{__autoconf}
133 %{__automake}
134 %configure \
135         --disable-silent-rules \
136         --enable-sql \
137         %{?with_odbc:--with-unixodbc=/usr}
138
139 %{__make} -j1
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 # obsoleted by pkg-config
148 %{__rm} $RPM_BUILD_ROOT%{_libdir}/{libmdb,libmdbsql}.la
149
150 %if %{with odbc}
151 # ODBC libraries are meant to be dlopened
152 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmdbodbc*.{la,a}
153 %endif
154
155 %if %{with gnome}
156 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/gmdb2.desktop
157 install -D %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/gmdb2.png
158
159 %find_lang gmdb --with-gnome --with-omf
160 %else
161 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/gmdb2.1
162 %endif
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %post   libs -p /sbin/ldconfig
168 %postun libs -p /sbin/ldconfig
169
170 %post   odbc -p /sbin/ldconfig
171 %postun odbc -p /sbin/ldconfig
172
173 %files
174 %defattr(644,root,root,755)
175 %doc AUTHORS ChangeLog NEWS README TODO doc/faq.html
176 %attr(755,root,root) %{_bindir}/mdb-*
177 %{_mandir}/man1/mdb-*.1*
178
179 %files libs
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_libdir}/libmdb.so.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libmdb.so.2
183 %attr(755,root,root) %{_libdir}/libmdbsql.so.*.*
184 %attr(755,root,root) %ghost %{_libdir}/libmdbsql.so.2
185
186 %files devel
187 %defattr(644,root,root,755)
188 %doc HACKING
189 %attr(755,root,root) %{_libdir}/libmdb.so
190 %attr(755,root,root) %{_libdir}/libmdbsql.so
191 %{_includedir}
192 %{_pkgconfigdir}/libmdb.pc
193 %{_pkgconfigdir}/libmdbsql.pc
194
195 %files static
196 %defattr(644,root,root,755)
197 %{_libdir}/libmdb.a
198 %{_libdir}/libmdbsql.a
199
200 %if %{with odbc}
201 %files odbc
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_libdir}/libmdbodbc.so
204 %attr(755,root,root) %{_libdir}/libmdbodbcW.so
205 %endif
206
207 %if %{with gnome}
208 %files gui -f gmdb.lang
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/gmdb2
211 %{_datadir}/gmdb
212 %{_desktopdir}/gmdb2.desktop
213 %{_pixmapsdir}/gmdb2.png
214 %{_mandir}/man1/gmdb2.1*
215 %endif
This page took 0.856702 seconds and 3 git commands to generate.