testsuite: install the testsuite in *-tests subpackage
Install it under %{_libdir}/%{name}/test, as is done in postgresql package. Remove the %check phase as it was kludge anyway. Version: 09.03.0400-2
This commit is contained in:
parent
46da9a502d
commit
b55cd2405a
@ -1,7 +1,7 @@
|
|||||||
Name: postgresql-odbc
|
Name: postgresql-odbc
|
||||||
Summary: PostgreSQL ODBC driver
|
Summary: PostgreSQL ODBC driver
|
||||||
Version: 09.03.0400
|
Version: 09.03.0400
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://psqlodbc.projects.postgresql.org/
|
URL: http://psqlodbc.projects.postgresql.org/
|
||||||
@ -22,7 +22,10 @@ PostgreSQL system via ODBC (Open Database Connectivity).
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n psqlodbc-%{version}
|
%setup -q -n psqlodbc-%{version}
|
||||||
|
cat <<EOF >README.rpmdist
|
||||||
|
The upstream psqlodbc testsuite is distributed in '%{name}-tests'
|
||||||
|
(sub)package.
|
||||||
|
EOF
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-unixodbc --disable-dependency-tracking
|
%configure --with-unixodbc --disable-dependency-tracking
|
||||||
@ -32,18 +35,20 @@ make %{?_smp_mflags}
|
|||||||
%install
|
%install
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
%global testsuitedir %{_libdir}/%{name}
|
||||||
%check
|
install -d -m 755 $RPM_BUILD_ROOT/%{testsuitedir}
|
||||||
%if 0%{?runselftest}
|
cp -R test $RPM_BUILD_ROOT/%{testsuitedir}
|
||||||
# Note that this requires having PostgresSQL server and unixODBC installed
|
( cd $RPM_BUILD_ROOT/%{testsuitedir}/test
|
||||||
# and properly configured - for this reason, disabled by default
|
sed -i \
|
||||||
cd test
|
-e "s|^[Uu]sername.*|Username = postgres|" \
|
||||||
sed -i "s|^[Uu]sername.*|Username = %{testdbuser}|" odbc.ini
|
-e "s|^[Pp]assword.*|Password = postgres-pass|" \
|
||||||
sed -i "s|^[Pp]assword.*|Password = %{testdbpass}|" odbc.ini
|
-e "s|^[Pp]rotocol.*|Protocol = 7.4|" \
|
||||||
cat odbc.ini
|
-e "s|^[Ss]erver[Nn]ame.*|Servername = /var/run/postgresql/|" \
|
||||||
make installcheck || { cat regression.diffs ; exit 1; }
|
odbc.ini
|
||||||
%endif
|
sed -i \
|
||||||
|
-e "s|^[Dd]river.*|Driver = %{_libdir}/psqlodbcw.so|" \
|
||||||
|
odbcinst.ini
|
||||||
|
)
|
||||||
|
|
||||||
# Provide the old library name "psqlodbc.so" as a symlink,
|
# Provide the old library name "psqlodbc.so" as a symlink,
|
||||||
# and remove the rather useless .la file
|
# and remove the rather useless .la file
|
||||||
@ -55,12 +60,32 @@ popd
|
|||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%package tests
|
||||||
|
Summary: Testsuite files for psqlodbc
|
||||||
|
Requires: postgresql-test
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
|
%description tests
|
||||||
|
The postgresql-odbc-tests package contains files needed for various tests for
|
||||||
|
the PostgreSQL unixODBC driver.
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_libdir}/psqlodbcw.so
|
%{_libdir}/psqlodbcw.so
|
||||||
%{_libdir}/psqlodbc.so
|
%{_libdir}/psqlodbc.so
|
||||||
%doc license.txt readme.txt docs/*
|
%doc license.txt readme.txt docs/* README.rpmdist
|
||||||
|
|
||||||
|
%files tests
|
||||||
|
%doc license.txt
|
||||||
|
%dir %{testsuitedir}
|
||||||
|
%defattr(-,postgres,postgres)
|
||||||
|
%{testsuitedir}/test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 19 2014 Pavel Raiskup <praiskup@redhat.com> - 09.03.0400-2
|
||||||
|
- install the testsuite
|
||||||
|
|
||||||
* Wed Oct 29 2014 Pavel Raiskup <praiskup@redhat.com> - 09.03.0400-1
|
* Wed Oct 29 2014 Pavel Raiskup <praiskup@redhat.com> - 09.03.0400-1
|
||||||
- rebase to latest upstream version, per release notes:
|
- rebase to latest upstream version, per release notes:
|
||||||
http://psqlodbc.projects.pgfoundry.org/docs/release.html
|
http://psqlodbc.projects.pgfoundry.org/docs/release.html
|
||||||
|
Loading…
Reference in New Issue
Block a user