Skip to content

Commit

Permalink
[packaging] Cleanup spec files. JB38781
Browse files Browse the repository at this point in the history
  • Loading branch information
mlehtima committed Sep 9, 2020
1 parent 08e5f42 commit ed37c5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
12 changes: 4 additions & 8 deletions rpm/sensorfw-qt5-hybris.inc
@@ -1,7 +1,6 @@
Summary: Sensor Framework Qt5
Group: System/Sensor Framework
License: LGPLv2+
URL: http://gitorious.org/sensorfw
URL: https://git.sailfishos.org/mer-core/sensorfw
Source0: %{name}-%{version}.tar.bz2
# Eventhough this is not really needed we have this here
# as this is added to packaging dir by tar_git.
Expand All @@ -23,7 +22,6 @@ Sensor Framework provides an interface to hardware sensor drivers through logica

%package devel
Summary: Sensor framework daemon libraries development headers
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt5-qtcore-devel
Requires: qt5-qtdbus-devel
Expand All @@ -33,20 +31,17 @@ Requires: qt5-qtnetwork-devel
Development headers for sensor framework daemon and libraries.

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

%build
unset LD_AS_NEEDED
export LD_RUN_PATH=%{_libdir}/sensord-qt5/
export QT_SELECT=5

%qmake5 CONFIG+=hybris %{qmake_extra_parameters} PC_VERSION=`echo %{version} | sed 's/+.*//'`

make %{?_smp_mflags}
%make_build

%install
rm -rf %{buildroot}
export QT_SELECT=5
%qmake5_install

%post
Expand All @@ -57,6 +52,7 @@ export QT_SELECT=5

%files
%defattr(-,root,root,-)
%license COPYING
%{_libdir}/libhybrissensorfw*.so.*
%{_libdir}/libhybrissensorfw*.so
%{_libdir}/sensord-qt5/*.so
Expand Down
19 changes: 6 additions & 13 deletions rpm/sensorfw-qt5.spec
Expand Up @@ -2,9 +2,8 @@ Name: sensorfw-qt5
Summary: Sensor Framework Qt5
Version: 0.12.0
Release: 0
Group: System/Sensor Framework
License: LGPLv2+
URL: http://gitorious.org/sensorfw
URL: https://git.sailfishos.org/mer-core/sensorfw
Source0: %{name}-%{version}.tar.bz2
Source1: sensorfwd.service
Source2: sensorfw-qt5-hybris.inc
Expand All @@ -24,8 +23,7 @@ BuildRequires: pkgconfig(mlite5)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(ssu-sysinfo)
BuildRequires: doxygen
BuildRequires: systemd
BuildRequires: libudev-devel
BuildRequires: pkgconfig(libudev)
Provides: sensord-qt5
Obsoletes: sensorframework

Expand All @@ -35,7 +33,6 @@ Sensor Framework provides an interface to hardware sensor drivers through logica

%package devel
Summary: Sensor framework daemon libraries development headers
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt5-qtcore-devel
Requires: qt5-qtdbus-devel
Expand All @@ -47,7 +44,6 @@ Development headers for sensor framework daemon and libraries.

%package tests
Summary: Unit test cases for sensord
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt5-qttest-devel
Requires: testrunner-lite
Expand All @@ -61,7 +57,6 @@ Contains unit test cases for CI environment.

%package configs
Summary: Sensorfw configuration files
Group: System/Libraries
BuildArch: noarch
Requires: %{name} = %{version}
Provides: sensord-configs
Expand All @@ -79,7 +74,7 @@ Sensorfw configuration files.

%package doc
Summary: API documentation for libsensord
Group: Documentation
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: doxygen
Obsoletes: %{name}-docs
Expand All @@ -90,26 +85,23 @@ API documentation for libsensord


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

%build
# setup proper lib
sed "s=@LIB@=%{_lib}=g" sensord-qt5.pc.in > sensord-qt5.pc
sed "s=@LIBDIR@=%{_libdir}=g" tests/tests.xml.in > tests/tests.xml
unset LD_AS_NEEDED
export LD_RUN_PATH=%{_libdir}/sensord-qt5/
export QT_SELECT=5

%qmake5 \
CONFIG+=ssusysinfo\
CONFIG+=mce\
PC_VERSION=`echo %{version} | sed 's/+.*//'`

make %{?_smp_mflags}
%make_build

%install
rm -rf %{buildroot}
export QT_SELECT=5
%qmake5_install

install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/sensorfwd.service
Expand Down Expand Up @@ -137,6 +129,7 @@ systemctl daemon-reload || :

%files
%defattr(-,root,root,-)
%license COPYING
%{_libdir}/libsensorclient-qt5.so.*
%{_libdir}/libsensordatatypes-qt5.so.*
%attr(755,root,root)%{_sbindir}/sensorfwd
Expand Down

0 comments on commit ed37c5f

Please sign in to comment.