summaryrefslogtreecommitdiffstats
path: root/firebird.spec
blob: 37b5cac0aa96a95a565e0f6623ea5895fee7c698 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
%global fbroot %{_libdir}/%{name}
%global major 3.0
%global _hardened_build 1

Summary: SQL relational database management system
Name:  firebird
Version: 3.0
Release:        1.20160226git6127d1e8%{?dist}

Group:  Applications/Databases
License: Interbase
URL:  http://www.firebirdsql.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

Source0:        firebird-6127d1e8.tar.gz
# from OpenSuse
Patch101: allow-creating-buildRoot-as-non-root-user.patch
Patch102: add-pkgconfig-files.patch

# from Debian

# from upstream

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtommath-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: libtermcap-devel
BuildRequires: libicu-devel
BuildRequires: libedit-devel
BuildRequires: gcc-c++
BuildRequires: libstdc++-static
BuildRequires: systemd-units
BuildRequires: chrpath
BuildRequires: zlib-devel

Requires(post):  /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires(postun): /usr/sbin/userdel
Requires(postun): /usr/sbin/groupdel
Requires(pre):  /usr/sbin/groupadd
Requires(pre):  /usr/sbin/useradd
Requires:  libfbclient2
Requires:  logrotate

%description
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.

%package devel
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Summary: UDF support library for Firebird SQL server

%description devel
This package is needed for development of client applications and user
defined functions (UDF) for Firebird SQL server.

Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.

%package -n libfbclient2
Group: System Environment/Libraries
Summary: Firebird SQL server client library

%description -n libfbclient2
Shared client library for Firebird SQL server.

Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.

%package -n libfbclient2-devel
Group: System Environment/Libraries
Summary: Development libraries and headers for Firebird SQL server
Requires: %{name}-devel
Requires: libfbclient2 = %{version}

%description -n libfbclient2-devel
Development files for Firebird SQL server client library.

Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.

%package doc
Group: Applications/Databases
Requires: %{name} = %{version}
Summary: Documentation for Firebird SQL server
BuildArch: noarch

%description doc
Documentation for Firebird SQL server.

Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.

%prep
%setup -q -n %{name}
%patch101 -p1
%patch102 -p1

%build
NOCONFIGURE=1 ./autogen.sh
%configure --prefix=%{_prefix} \
  --disable-binreloc \
  --with-system-icu --with-system-editline \
  --with-fbbin=%{_bindir} --with-fbsbin=%{_sbindir} \
  --with-fbconf=%{_sysconfdir}/%{name} \
  --with-fblib=%{_libdir} --with-fbinclude=%{_includedir}/%{name} \
  --with-fbdoc=%{_docdir}/%{name} \
  --with-fbudf=%{_libdir}/%{name}/udf \
  --with-fbsample=%{_docdir}/%{name}/sample \
  --with-fbsample-db=%{_libdir}/%{name}/sample \
  --with-fbhelp=%{_libdir}/%{name}/lib \
  --with-fbintl=%{_libdir}/%{name}/intl \
  --with-fbmisc=%{_datadir}/%{name}/misc \
  --with-fbsecure-db=%{_localstatedir}/lib/%{name}/secdb \
  --with-fbmsg=%{_libdir}/%{name}/lib \
  --with-fblog=%{_localstatedir}/log/%{name} \
  --with-fbglock=%{_localstatedir}/run/%{name} \
  --with-fbplugins=%{_libdir}/%{name}/plugins

make %{?_smp_mflags}
cd gen
make -f Makefile.install buildRoot
chmod -R u+w buildroot%{_docdir}/%{name}

%install
chmod u+rw,a+rx gen/buildroot/usr/include/firebird/firebird/impl
cp -r gen/buildroot/* ${RPM_BUILD_ROOT}/
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig
cp -v gen/install/misc/*.pc ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/
cd ${RPM_BUILD_ROOT}
mkdir -p .%{_libdir}/%{name}/utils
mv -v .%{_sbindir}/*.sh .%{_libdir}/%{name}/utils/
mv -v .%{_sbindir}/fb_config .%{_libdir}/%{name}/utils/
rm -vf .%{_includedir}/%{name}/perf.h
rm -vf .%{_libdir}/libicu*.so
rm -vf .%{_includedir}/*.h
chmod -R u+w .%{_docdir}/%{name}
rm -vf .%{_datadir}/%{name}/misc/firebird.init.*
rm -vf .%{_datadir}/%{name}/misc/rc.config.firebird
mv -v .%{_sysconfdir}/%{name}/README .%{_sysconfdir}/%{name}/WhatsNew \
  .%{_docdir}/%{name}/
mv -v .%{_sysconfdir}/%{name}/IDPLicense.txt .%{_docdir}/%{name}/
mv -v .%{_sysconfdir}/%{name}/IPLicense.txt .%{_docdir}/%{name}/

%clean
rm -Rf %{buildroot}


%files
%{_bindir}/*
%{_sbindir}/*
%{_libdir}/%{name}/utils
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
%{_libdir}/libib_util.so
%dir %{_libdir}/%{name}
%dir %{_datadir}/%{name}
%{_libdir}/%{name}/lib
%{_libdir}/%{name}/intl
%{_datadir}/%{name}/misc
%{_libdir}/%{name}/plugins
%{_libdir}/%{name}/udf
%attr(755,root,root) /etc/init.d/firebird
%{_docdir}/%{name}/IDPLicense.txt
%{_docdir}/%{name}/IPLicense.txt

%dir %{_localstatedir}/lib/%{name}
%dir %{_localstatedir}/lib/%{name}/secdb
%attr(0600,firebird,firebird) %config(noreplace) %{_localstatedir}/lib/%{name}/secdb/security3.fdb
%dir %{_libdir}/%{name}/sample
%attr(0600,firebird,firebird) %{_libdir}/%{name}/sample/*
%attr(0750,firebird,firebird) %{_localstatedir}/log/%{name}


%files devel
%defattr(-,root,root)
%{_includedir}/%{name}

%files -n libfbclient2
%defattr(-,root,root)
%{_libdir}/libfbclient.so.*

%files -n libfbclient2-devel
%defattr(-,root,root)
%{_libdir}/libfbclient.so
%{_libdir}/pkgconfig/fbclient.pc

%files doc
%{_docdir}/%{name}
%exclude %{_docdir}/%{name}/sample
%exclude %{_docdir}/%{name}/IDPLicense.txt
%exclude %{_docdir}/%{name}/IPLicense.txt


%changelog
* Fri Feb 26 2016 Philippe Makowski <makowski@fedoraproject.org> - 3.0-1.20160226git6127d1e8
- Update to git: 6127d1e8

* Wed Feb 24 2016 Philippe Makowski <makowski@fedoraproject.org> -
-  first version for Epel7