-
Notifications
You must be signed in to change notification settings - Fork 2
/
unixODBC-el7.spec
116 lines (94 loc) · 2.9 KB
/
unixODBC-el7.spec
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
%define name unixODBC
%define ver 2.3.4
%define prefix /usr
%define sysconfdir /etc
Summary: ODBC driver manager and drivers for PostgreSQL, MySQL, etc.
Name: %{name}
Version: %ver
Release: 1.el7
License: LGPL and GPL
Group: Applications/Databases
Source: %{name}-%{ver}.tar.gz
BuildRoot: /var/tmp/%{name}-%{ver}-root
URL: http://www.unixodbc.org/
Docdir: %{prefix}/doc
Prefix: %prefix
%description
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).
%package devel
Summary: Includes and static libraries for ODBC development
Group: Development/Libraries
Requires: %{name} = %{ver}
%description devel
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).
This package contains the include files and static libraries
for development.
%package gui-qt
Summary: ODBC configurator, Data Source browser and ODBC test tool based on Qt
Group: Applications/Databases
Requires: %{name} = %{ver}
%description gui-qt
unixODBC aims to provide a complete ODBC solution for the Linux platform.
All programs are GPL.
All libs are LGPL (except nn which is GPL?).
This package contains two Qt based GUI programs for unixODBC:
ODBCConfig and DataManager
%prep
%setup
%ifarch alpha
ARCH_FLAGS="--host=alpha-redhat-linux"
%endif
export -n LANG LINGUAS LC_ALL
if [ ! -f configure ]; then
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir}
else
CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix} --sysconfdir=%{sysconfdir} --enable-gui=no
fi
%build
export -n LANG LINGUAS LC_ALL
if [ "$SMP" != "" ]; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install-strip
mv $RPM_BUILD_ROOT%{prefix}/lib $RPM_BUILD_ROOT%{prefix}/lib64
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README doc
%config(noreplace) %{sysconfdir}/odbc.ini
%config(noreplace) %{sysconfdir}/odbcinst.ini
%{prefix}/bin/dltest
%{prefix}/bin/slencheck
%{prefix}/bin/isql
%{prefix}/bin/iusql
%{prefix}/bin/odbcinst
%{prefix}/bin/odbc_config
%{_libdir}/libodbc.so*
%{_libdir}/libodbccr.so*
%{_libdir}/libodbcinst.so*
%{prefix}/share/man/man1/dltest.1.gz
%{prefix}/share/man/man1/isql.1.gz
%{prefix}/share/man/man1/iusql.1.gz
%{prefix}/share/man/man1/odbc_config.1.gz
%{prefix}/share/man/man1/odbcinst.1.gz
%{prefix}/share/man/man5/odbc.ini.5.gz
%{prefix}/share/man/man5/odbcinst.ini.5.gz
%{prefix}/share/man/man7/unixODBC.7.gz
%files devel
%defattr(-, root, root)
%{prefix}/include/*
%{prefix}/lib64/*.la
%files gui-qt
%defattr(-, root, root)