Skip to content

Commit

Permalink
feat: depends on deepin-elf-verify under the uos
Browse files Browse the repository at this point in the history
Check if the current system name contains `UOS`, if environment
supports deepin-elf-verify, add deepin-elf-verify / deepin-elf-sign-tool
to Depends of deepin-deb-installer.
Use `debian/control.uos` replace `debian/control`.

Log: change debian rules.
Influence: debian/rules debian/control
  • Loading branch information
rb-union committed Sep 4, 2024
1 parent 0ed84c1 commit 00005c0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Homepage: https://www.deepin.com/

Package: deepin-deb-installer
Architecture: any
# If the current system contains `UOS` and packages deepin-elf-verify / deepin-elf-sign-tool exists.
# Use `control.uos` replace `control`, see `debian/rules`.
Depends: ${shlibs:Depends}, ${misc:Depends}, libqapt3-runtime, libqapt3
Description: Package Installer helps users install and remove local packages.
Package Installer is an easy-to-use .deb package management tool
Expand Down
17 changes: 17 additions & 0 deletions debian/control.uos
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: deepin-deb-installer
Section: utils
Priority: optional
Maintainer: Deepin Packages Builder <[email protected]>
Build-Depends: debhelper (>= 9), pkg-config, cmake, libqt5widgets5, libqt5concurrent5, libqapt-dev, libdtkwidget-dev, qtbase5-dev, qttools5-dev-tools, qttools5-dev, qtchooser, libgtest-dev, deepin-gettext-tools, libpolkit-qt5-1-dev
Standards-Version: 4.3.0
Homepage: https://www.deepin.com/

Package: deepin-deb-installer
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqapt3-runtime, libqapt3, deepin-elf-verify, deepin-elf-sign-tool
Description: Package Installer helps users install and remove local packages.
Package Installer is an easy-to-use .deb package management tool
with a simple interface for users to quickly install customized applications
not included in App Store supporting bulk installation, version identification
and auto completion.
Recommends: uos-reporter, deepin-event-log
17 changes: 17 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ export QT_SELECT := 5
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
include /usr/share/dpkg/default.mk

# Check if the system name contains `uos`, and environment supports deepin-elf-verify, use 'control.uos'.
# Add deepin-elf-verify / deepin-elf-sign-tool to Depends of deepin-deb-installer.
CONTROL_FILE = debian/control
# If SystemName contain 'UOS' and deepin-elf-verify exists;
UOS_SYSTEM := $(shell grep -ioP 'SystemName=\KUOS.*' /etc/os-version)
ifneq ($(UOS_SYSTEM),)
ELF_EXISTS := $(shell apt-cache show deepin-elf-verify deepin-elf-sign-tool 2>/dev/null | grep -E '^Package:')
ifneq ($(ELF_EXISTS),)
CONTROL_FILE = debian/control.uos
endif
endif

override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -19,3 +31,8 @@ override_dh_auto_configure:

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

override_dh_gencontrol:
@echo "--- current system is '$(UOS_SYSTEM)', control file is '$(CONTROL_FILE)'"
dh_gencontrol -- -c$(CONTROL_FILE)

0 comments on commit 00005c0

Please sign in to comment.