Skip to content

Commit

Permalink
Use modern statements in spec file (#326)
Browse files Browse the repository at this point in the history
* Use modern statements in spec file
- `%global` instead of `%define` for static expressions: `%global`s are evaluated once when set, `%define`s are evaluated each time used.  Plus the scope of `%global`s is all sections, including the scriptlets.
- `-n %{name}-%{version}` always has been the default for `%setup`, hence omitted now.
-  `rm -rf %{buildroot}` as first statement in the `%install` section is long obsolete, thus superfluous.

* Post release version increase
  • Loading branch information
Olf0 authored Jan 5, 2023
2 parents 78731f3 + 2490316 commit 0ec1254
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions rpm/patchmanager.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define theme sailfish-default
%global theme sailfish-default

# These macros should already be defined in the RPMbuild environment, see: rpm --showrc
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
Expand All @@ -8,7 +8,7 @@
Name: patchmanager

Summary: Allows to manage Patches for SailfishOS
Version: 3.2.4
Version: 3.2.5
Release: 1
Group: Qt/Qt
License: BSD-3-Clause
Expand Down Expand Up @@ -38,6 +38,7 @@ BuildRequires: qt5-qttools-linguist
BuildRequires: pkgconfig(rpm)
BuildRequires: pkgconfig(popt)


%package testcases
Summary: Provides test cases for Patchmanager
Group: Development
Expand Down Expand Up @@ -106,15 +107,17 @@ Url:


%prep
%setup -q -n %{name}-%{version}

%setup -q


%build

%qtc_qmake5 "PROJECT_PACKAGE_VERSION=%{version}"
%qtc_make %{?_smp_mflags}


%install
rm -rf %{buildroot}

%qmake5_install

Expand All @@ -129,6 +132,7 @@ ln -s ../lipstick-patchmanager.service %{buildroot}/%{_userunitdir}/lipstick.ser

mkdir -p %{buildroot}%{_datadir}/%{name}/patches


%pre
export NO_PM_PRELOAD=1
case "$1" in
Expand Down Expand Up @@ -157,6 +161,7 @@ case "$1" in
esac
exit 0


%post
export NO_PM_PRELOAD=1
case "$1" in
Expand Down Expand Up @@ -184,6 +189,7 @@ systemctl restart dbus-org.SfietKonstantin.patchmanager.service
systemctl restart checkForUpdates-org.SfietKonstantin.patchmanager.timer
exit 0


%preun
export NO_PM_PRELOAD=1
case "$1" in
Expand All @@ -201,6 +207,7 @@ case "$1" in
esac
exit 0


%postun
export NO_PM_PRELOAD=1
case "$1" in
Expand All @@ -224,6 +231,7 @@ systemctl daemon-reload
systemctl-user daemon-reload
exit 0


%files testcases
%defattr(-,root,root,-)
%{_libdir}/qt5/qml/org/SfietKonstantin/patchmanagertests
Expand All @@ -232,6 +240,7 @@ exit 0
%{_datadir}/patchmanager-testcase
%{_datadir}/patchmanager-test/testfile


%files
%defattr(-,root,root,-)

Expand Down

0 comments on commit 0ec1254

Please # to comment.