Use macros to ensure that the correct tcl version is always used
This commit is contained in:
parent
32da0eec60
commit
11e04db76e
36
sqlite2.spec
36
sqlite2.spec
|
@ -1,8 +1,9 @@
|
||||||
%define tclver 8.5
|
%{!?tcl_version: %global tcl_version %((echo 0; echo 'puts $tcl_version' | tclsh) | tail -1)}
|
||||||
|
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
|
||||||
|
|
||||||
Name: sqlite2
|
Name: sqlite2
|
||||||
Version: 2.8.17
|
Version: 2.8.17
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
|
|
||||||
Summary: Embeddable SQL engine in a C library
|
Summary: Embeddable SQL engine in a C library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
@ -19,8 +20,8 @@ Patch7: sqlite-2.8.17-tcl.patch
|
||||||
Patch8: sqlite-2.8.17-ppc64.patch
|
Patch8: sqlite-2.8.17-ppc64.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: ncurses-devel readline-devel %{_includedir}/tcl.h
|
BuildRequires: ncurses-devel, readline-devel, %{_includedir}/tcl.h
|
||||||
Obsoletes: sqlite < 3
|
Obsoletes: sqlite < 3, sqlite%{?_isa} < 3
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SQLite is a small, fast, embeddable SQL database engine that supports
|
SQLite is a small, fast, embeddable SQL database engine that supports
|
||||||
|
@ -33,9 +34,8 @@ available.
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for SQLite
|
Summary: Development files for SQLite
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig
|
||||||
Requires: pkgconfig
|
Obsoletes: sqlite-devel < 3, sqlite-devel%{?_isa} < 3
|
||||||
Obsoletes: sqlite-devel < 3
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
SQLite is a small, fast, embeddable SQL database engine that supports
|
SQLite is a small, fast, embeddable SQL database engine that supports
|
||||||
|
@ -47,8 +47,13 @@ applications using sqlite.
|
||||||
%package tcl
|
%package tcl
|
||||||
Summary: Tcl bindings for sqlite
|
Summary: Tcl bindings for sqlite
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Requires: tcl >= %{tclver}, %{name} = %{version}-%{release}
|
%if 0%{?rhel}%{?fedora} > 5
|
||||||
Obsoletes: sqlite-tcl < 3
|
Requires: tcl(abi) = %{tcl_version}
|
||||||
|
%else
|
||||||
|
Requires: tcl%{?_isa} >= %{tcl_version}
|
||||||
|
%endif
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: sqlite-tcl < 3, sqlite-tcl%{?_isa} < 3
|
||||||
|
|
||||||
%description tcl
|
%description tcl
|
||||||
SQLite is a small, fast, embeddable SQL database engine that supports
|
SQLite is a small, fast, embeddable SQL database engine that supports
|
||||||
|
@ -83,16 +88,17 @@ make test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
DIRECTORY=$RPM_BUILD_ROOT%{_libdir}/sqlite-%version
|
DIRECTORY=$RPM_BUILD_ROOT%{_libdir}/sqlite-%{version}
|
||||||
install -d $DIRECTORY
|
install -d $DIRECTORY
|
||||||
echo 'package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so]]' > $DIRECTORY/pkgIndex.tcl
|
echo 'package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so]]' > $DIRECTORY/pkgIndex.tcl
|
||||||
|
|
||||||
%makeinstall
|
%makeinstall
|
||||||
install -D -m 0644 sqlite.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlite.1
|
install -D -m 0644 sqlite.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlite.1
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}
|
mkdir -p $RPM_BUILD_ROOT%{tcl_sitearch}
|
||||||
mv $DIRECTORY $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite2
|
mv -f $DIRECTORY $RPM_BUILD_ROOT%{tcl_sitearch}/sqlite2
|
||||||
|
|
||||||
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
|
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_bindir}/tclsqlite
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
@ -116,10 +122,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%files tcl
|
%files tcl
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc doc/tclsqlite.html
|
%doc doc/tclsqlite.html
|
||||||
%exclude %{_bindir}/tclsqlite
|
%{tcl_sitearch}/sqlite2/
|
||||||
%{_libdir}/tcl%{tclver}/sqlite2
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 02 2012 Robert Scheck <robert@fedoraproject.org> - 2.8.17-10
|
||||||
|
- Use macros to ensure that the correct tcl version is always used
|
||||||
|
|
||||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-9
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue