summaryrefslogtreecommitdiffstats
path: root/unixodbc23/meta-unixODBC.spec
blob: 5888b625df1b55aef82635ec9799acd7e13873d6 (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
%{!?scl:%global scl unixodbc-2.3}
%scl_package %scl

Summary: Package that installs %scl
Name: %scl_name
Version: 1
Release: 1%{?dist}
BuildArch: noarch
License: GPLv2+
Requires: scl-utils
Requires: %{scl_prefix}unixODBC
BuildRequires: scl-utils-build

%description
This is the main package for %scl scl.

%package runtime
Summary: Package that enables %scl scl
Requires: %{name} = %{version}-%{release}

%description runtime
Package shipping essential scripts to work with %scl scl.

%package build
Summary: Package shipping basic build configuration

%description build
Package shipping essential configuration macros to build %scl scl.

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_scl_scripts}/root

# During the build of this package, we don't know which architecture it is 
# going to be used on, so if we build on 64-bit system and use it on 32-bit, 
# the %{_libdir} would stay expanded to '.../lib64'. This way we determine 
# architecture everytime the 'scl enable ...' is run and set the 
# LD_LIBRARY_PATH accordingly
cat >> %{buildroot}%{_scl_scripts}/enable << \EOF
export PATH=%{_bindir}:$PATH
export CPATH=%{_includedir}:$CPATH
export LIBRARY_PATH=%{_scl_root}`rpm -E %%_libdir`:$LIBRARY_PATH
export LD_LIBRARY_PATH=%{_scl_root}`rpm -E %%_libdir`:$LD_LIBRARY_PATH
EOF
%scl_install

%files

%files runtime
%scl_files

%files build
%{_root_sysconfdir}/rpm/macros.%{scl}-config

%changelog
* Wed Nov 30 2011 Honza Horak <hhorak@redhat.com> - 1-1
- Initial package