fix: build package error

Deb and rpm build script error.
This commit is contained in:
dengbo
2025-04-15 21:22:28 +08:00
committed by dengbo
parent e9d667c9cb
commit 1153fb2e54
2 changed files with 3 additions and 21 deletions

19
debian/rules vendored
View File

@ -1,29 +1,10 @@
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
OS=$(shell awk '/^NAME=/' /etc/os-release | sed 's/NAME=//' | sed 's/\"//g' | tr '[:upper:]' '[:lower:]')
OS_VERSION=$(shell awk '/VERSION=/' /etc/os-release | sed 's/VERSION=//' | sed 's/\"//g' | sed 's/[.]0/./')
ARCH=$(shell dpkg-architecture -qDEB_TARGET_MULTIARCH)
ENABLE_UAB_SUPPORT=FALSE
ifeq ($(OS), deepin)
ENABLE_UAB_SUPPORT=TRUE
endif
%:
dh $@ --buildsystem=cmake
override_dh_auto_install:
dh_auto_install
ifeq ($(ENABLE_UAB_SUPPORT), TRUE)
install -d debian/linglong-builder/usr/lib/$(ARCH)/linglong/builder/uab
dh_install -p linglong-builder usr/lib/$(ARCH)/linglong/builder/uab/ usr/lib/$(ARCH)/linglong/builder/
endif
EXTRA_OPTION = -DCPM_LOCAL_PACKAGES_ONLY=ON -DLINGLONG_VERSION=$(DEB_VERSION_UPSTREAM) -DENABLE_LINGLONG_INSTALLER=ON
ifeq ($(ENABLE_UAB_SUPPORT), TRUE)
EXTRA_OPTION += -DENABLE_UAB=ON
endif
override_dh_auto_configure:
dh_auto_configure -- ${EXTRA_OPTION} ${DH_AUTO_ARGS}

View File

@ -10,9 +10,9 @@ Source0: %{url}/archive/%{version}/linglong-%{version}.tar
BuildRequires: cmake gcc-c++
BuildRequires: qt5-qtbase-devel qt5-qtbase-private-devel
BuildRequires: glib2-devel nlohmann-json-devel ostree-devel yaml-cpp-devel
BuildRequires: systemd-devel gtest-devel libseccomp-devel elfutils-libelf-devel
BuildRequires: systemd-devel gtest-devel elfutils-libelf-devel
BuildRequires: glibc-static libstdc++-static
BuildRequires: libcurl-devel openssl-devel libcap-devel
BuildRequires: libcurl-devel openssl-devel
BuildRequires: gtest-devel gmock-devel
Requires: linglong-bin = %{version}-%{release}
@ -88,6 +88,7 @@ cd build
%{_libexecdir}/%{name}/ld-cache-generator
%{_libexecdir}/%{name}/font-cache-generator
%{_libexecdir}/%{name}/ll-dialog
%{_libexecdir}/%{name}/dumb-init
%{_libexecdir}/%{name}/dialog/99-linglong-permission
%{_datadir}/bash-completion/completions/ll-cli
%{_datadir}/zsh/vendor-completions/_ll-cli