- Use cmake for building

- Run tests during build

OBS-URL: https://build.opensuse.org/package/show/Archiving/lzop?expand=0&rev=20
This commit is contained in:
Martin Pluskal 2017-11-11 18:36:12 +00:00 committed by Git OBS Bridge
parent 4d0a69be58
commit cbc5020fc8
2 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Nov 11 18:35:11 UTC 2017 - mpluskal@suse.com
- Use cmake for building
- Run tests during build
-------------------------------------------------------------------
Sat Nov 11 15:56:14 UTC 2017 - aavindraa@gmail.com

View File

@ -24,7 +24,7 @@ License: GPL-2.0+
Group: Productivity/Archiving/Compression
Url: http://www.lzop.org
Source0: http://www.lzop.org/download/%{name}-%{version}.tar.gz
Source1: %{name}.changes
BuildRequires: cmake
BuildRequires: lzo-devel
%description
@ -39,20 +39,18 @@ lzop was designed with the following goals in mind:
%prep
%setup -q
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE1}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -name '*.[ch]' |\
xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
%build
%configure
make %{?_smp_mflags}
%cmake
%make_jobs
%install
%make_install
%cmake_install
# Remove unwanted doc folder created during build
rm -fr %{buildroot}%{_datadir}/doc
rm -fr %{buildroot}%{_datadir}/doc
%check
%ctest
%files
%doc AUTHORS ChangeLog COPYING NEWS README THANKS