Skip to content

Commit

Permalink
Use new CMake macros everywhere
Browse files Browse the repository at this point in the history
And update %cmake_liri.
  • Loading branch information
plfiorini committed Oct 11, 2020
1 parent d32768f commit 23ea608
Show file tree
Hide file tree
Showing 30 changed files with 151 additions and 191 deletions.
11 changes: 5 additions & 6 deletions fluid/fluid.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -39,15 +41,12 @@ with the Material Design language.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} -DFLUID_USE_SYSTEM_LCS:BOOL=ON ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri -DFLUID_USE_SYSTEM_LCS:BOOL=ON
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%check
Expand Down
11 changes: 5 additions & 6 deletions libliri/libliri.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -40,15 +42,12 @@ developing applications that use %{name}.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%files
Expand Down
11 changes: 5 additions & 6 deletions liri-appcenter/liri-appcenter.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -47,15 +49,12 @@ Files for development of Liri AppCenter plugins.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%check
Expand Down
11 changes: 5 additions & 6 deletions liri-browser/liri-browser.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -39,15 +41,12 @@ the Liri desktop.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%check
Expand Down
11 changes: 5 additions & 6 deletions liri-calamares-branding/liri-calamares-branding.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -33,15 +35,12 @@ Liri OS branding and customizations for Calamares.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%check
Expand Down
11 changes: 5 additions & 6 deletions liri-calculator/liri-calculator.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -34,15 +36,12 @@ Material Design calculator.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%check
Expand Down
15 changes: 2 additions & 13 deletions liri-cmake-shared/liri-cmake-shared.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -38,25 +40,12 @@ RPM macros for building Liri packages.


%build
%if 0%{?fedora} >= 33
%cmake
%cmake_build
%else
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%endif


%install
%if 0%{?fedora} >= 33
%cmake_install
%else
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%endif

install -Dpm644 %{_sourcedir}/macros.liri %{buildroot}%{_rpmconfigdir}/macros.d/macros.liri


Expand Down
7 changes: 5 additions & 2 deletions liri-cmake-shared/macros.liri
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
%_liri_libexecdir %_libexecdir/liri
%_liri_buildtype release

%cmake_liri \
%cmake_liri \\\
%undefine __cmake_in_source_build \
QTDIR="%{_qt5_prefix}" ; export QTDIR ; \
PATH="%{_qt5_bindir}:$PATH" ; export PATH ; \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
%{?fedora:%{__cmake}}%{?rhel:%{__cmake3}} \\\
%{__cmake} \\\
%{?__cmake_builddir:-S "%{_vpath_srcdir}"} \\\
%{?__cmake_builddir:-B "%{__cmake_builddir}"} \\\
-DBUILD_TESTING:BOOL=FALSE \\\
-DCMAKE_BUILD_TYPE=%{_liri_buildtype} \\\
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
Expand Down
11 changes: 5 additions & 6 deletions liri-eglfs/liri-eglfs.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%define snapdate @DATE@
%define snaphash @HASH@

Expand Down Expand Up @@ -48,15 +50,12 @@ developing applications that use %{name}.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install
rm -f %{buildroot}%{_libdir}/libLiri1{EdidSupport,KmsSupport,LibInput}.a
rm -rf %{buildroot}%{_includedir}/Liri{EglFSDeviceIntegration,EglFSKmsSupport,EdidSupport,KmsSupport,LibInput}
rm -f %{buildroot}%{_libdir}/libLiri1EglFS{DeviceIntegration,KmsSupport}.so
Expand Down
11 changes: 5 additions & 6 deletions liri-files/liri-files.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -34,15 +36,12 @@ Files is a file manager for Liri.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install

%find_lang %{name} --all-name --with-qt

Expand Down
11 changes: 5 additions & 6 deletions liri-materialdecoration/liri-materialdecoration.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This package needs to be rebuilt every time Qt is updated.

%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -28,15 +30,12 @@ Material Design decoration for Qt applications on Wayland.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%files
Expand Down
11 changes: 5 additions & 6 deletions liri-networkmanager/liri-networkmanager.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -40,15 +42,12 @@ to access network options from the Liri shell.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%files
Expand Down
11 changes: 5 additions & 6 deletions liri-platformtheme/liri-platformtheme.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This package needs to be rebuilt every time Qt is updated.

%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -29,15 +31,12 @@ Qt Platform Theme integration plugin for Liri.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%files
Expand Down
14 changes: 6 additions & 8 deletions liri-power-manager/liri-power-manager.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -40,17 +42,13 @@ settings module to configure power consumption settings.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} \
-DINSTALL_SYSTEMDUSERUNITDIR:PATH=%{_userunitdir} \
..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri \
-DINSTALL_SYSTEMDUSERUNITDIR:PATH=%{_userunitdir}
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%posttrans
Expand Down
11 changes: 5 additions & 6 deletions liri-pulseaudio/liri-pulseaudio.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%undefine __cmake_in_source_build

%global snapdate @DATE@
%global snaphash @HASH@

Expand Down Expand Up @@ -36,15 +38,12 @@ to access volume and media players from the Liri shell.


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_liri} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake_liri
%cmake_build


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%cmake_install


%files
Expand Down
Loading

0 comments on commit 23ea608

Please sign in to comment.