Skip to content

Commit

Permalink
[packaging] Refine systemd unit install and test cleanup
Browse files Browse the repository at this point in the history
SystemD unit files sometimes install under /usr/lib and not /lib
directly. Handle installation of the unit files during
packaging. For earlier handling, add CONFIG option that is
currently used for Debian.

In addition, remove ambiguity in a test script by specifying that
it is using python3.

Signed-off-by: Rinigus <rinigus.git@gmail.com>
  • Loading branch information
rinigus committed Sep 27, 2020
1 parent 405f078 commit 5ec9d99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/rules
Expand Up @@ -48,7 +48,7 @@ configure-stamp: builddir
dh_testdir

# Add here commands to configure the package.
cd $(BUILD_DIR) && qmake $(QMAKECONFIG) CONFIG+="configs" CONFIG+="autohybris" "QMAKE_CXXFLAGS=$(CFLAGS)" "MAKE_DOCS=$(MAKE_DOCS)" ../$(PROJECT_NAME).pro
cd $(BUILD_DIR) && qmake $(QMAKECONFIG) CONFIG+="configs" CONFIG+="autohybris" CONFIG+="systemdunit" "QMAKE_CXXFLAGS=$(CFLAGS)" "MAKE_DOCS=$(MAKE_DOCS)" ../$(PROJECT_NAME).pro
export LD_RUN_PATH=/usr/lib/sensord-qt5/

touch configure-stamp
Expand Down
2 changes: 1 addition & 1 deletion rpm/sensorfw-qt5.spec
Expand Up @@ -47,7 +47,7 @@ Summary: Unit test cases for sensord
Requires: %{name} = %{version}-%{release}
Requires: qt5-qttest-devel
Requires: testrunner-lite
Requires: python
Requires: python(abi) > 3.0
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

Expand Down
4 changes: 4 additions & 0 deletions sensorfw.pro
Expand Up @@ -96,7 +96,11 @@ contains(CONFIG,hybris) {
SENSORDCONFIGFILES.files += config/20-sensors-default.conf
SENSORDCONFIGFILES.path = /etc/sensorfw/sensord.conf.d
INSTALLS += SENSORDCONFIGFILES
}

contains(CONFIG,systemdunit) {
# Install service files through packaging to take into account
# units file location unless called with CONFIG+=systemdunit
SENSORSYSTEMD.files = rpm/sensorfwd.service
SENSORSYSTEMD.path = /lib/systemd/system
INSTALLS += SENSORSYSTEMD
Expand Down
2 changes: 1 addition & 1 deletion tests/deadclient/sensord-deadclienttest.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
##
## Copyright (C) 2009-2010 Nokia Corporation
##
Expand Down

0 comments on commit 5ec9d99

Please sign in to comment.