adaptations for CMake out-of-tree builds

See: https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
This commit is contained in:
Fabio Valentini 2020-08-06 11:40:54 +02:00
parent 82ba06828b
commit 5f6062a146
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
# I don't see an obvious way to get a tarball by tag from gitorious, so:
# force out-of-tree build for spec compatibility with older releases
%undefine __cmake_in_source_build
Name: brewtarget
Version: 2.1.0
@ -26,12 +27,13 @@ It also can export and import recipes in BeerXML.
%build
%cmake -DDO_RELEASE_BUILD:BOOL=ON
make %{?_smp_mflags}
%cmake_build
%install
make VERBOSE=1 INSTALL="install -p" CP="cp -p" DESTDIR=%{buildroot} install
%cmake_install
/usr/bin/install -m 0644 -Dp doc/brewtarget.1 %buildroot%{_mandir}/man1/brewtarget.1
%check
desktop-file-validate %buildroot%{_datadir}/applications/%{name}.desktop
%files