-
Notifications
You must be signed in to change notification settings - Fork 0
/
libtabula.spec.in
99 lines (79 loc) · 2.97 KB
/
libtabula.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Summary: DBMS-independent C++ database access library
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
License: LGPL
Group: Development/Libraries
URL: http://libtabula.org/
Source0: http://libtabula.org/releases/libtabula-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: mysql-devel
%description
libtabula makes working with database server SQL queries as easy as
working with STL containers. This package contains only the libraries
needed to run libtabula-based programs. If you are building your own
libtabula-based programs, you also need to install the -devel package.
%package devel
Summary: libtabula developer files (headers, examples, etc.)
Group: Development/Libraries
Requires: libtabula = %{version}-%{release}, mysql-devel
%description devel
These are the files needed to compile libtabula based programs, plus
some sample code to get you started. If you aren't building your own
programs, you probably don't need to install this package.
%package manuals
Summary: libtabula user and reference manuals
Group: Development/Libraries
%description manuals
This is the libtabula documentation. It's a separate RPM because
it's large enough that not everyone will want to install it, and
it's optional. The same content is online at http://libtabula.org
%prep
%setup -q
# Fakery for nodoc case
if [ ! -e doc/README-devel-RPM.txt ]
then
touch doc/README-devel-RPM.txt
touch doc/README-doc-RPM.txt
touch doc/README-manuals-RPM.txt
%{__mkdir_p} doc/html doc/pdf
fi
%build
%configure --disable-dependency-tracking
%{__make} %{?_smp_mflags}
%install
rm -rf %{buildroot} doc/examples
%{__mkdir_p} %{buildroot}{%{_libdir},%{_includedir}}
%{__make} DESTDIR=%{buildroot} install
# Copy example programs to doc directory
%{__mkdir_p} doc/examples
%{__install} -m644 examples/*.{cpp,h} doc/examples/
%{__install} -m644 config.h doc/examples/
sed -i -e s@../[email protected]@ doc/examples/threads.h
# Fix up simple example Makefile to allow it to build on the install
# system, as opposed to the system where the Makefile was created.
%{__sed} -e 's@./examples/@@' \
-e 's@^CPPFLAGS.*$@CPPFLAGS := $(shell mysql_config --cflags)@' \
-e 's@^LDFLAGS.*$@LDFLAGS := $(shell mysql_config --libs)@' \
-e 's@ -Ilib@@' \
-e '/^all:/s/test_[a-z,_]* //g' \
Makefile.simple > doc/examples/Makefile
%clean
rm -rf %{buildroot} doc/examples
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog.md COPYING.md CREDITS.md LICENSE.md README.md
%{_libdir}/libtabula.so.*
%files devel
%defattr(-,root,root,-)
%doc doc/examples doc/README-devel-RPM.txt README-examples.md Wishlist.md
%{_includedir}/libtabula
%{_libdir}/libtabula.so
%files manuals
%defattr(-,root,root,-)
%doc doc/html doc/pdf doc/README-manuals-RPM.txt
%changelog
* Fri May 23 2014 Warren Young <[email protected]> 4.0.0-1
- Forked from MySQL++ r2767 (3.2.1 plus a handful of checkins)