From 6019d645041fbf9390151a63d185d19bf4dfb11f Mon Sep 17 00:00:00 2001 From: dengbo Date: Sat, 6 May 2023 13:10:39 +0800 Subject: [PATCH] chore: Makefile can use go mod move GO111MODULE=off to debain rules Log: (cherry picked from commit 0c297a1260a9188c88cd6d885e6198b78073205e) --- Makefile | 62 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 985381975..b66b802d6 100644 --- a/Makefile +++ b/Makefile @@ -2,19 +2,22 @@ PREFIX = /usr GOPATH_DIR = gopath GOPKG_PREFIX = github.com/linuxdeepin/dde-daemon GOBUILD = go build $(GO_BUILD_FLAGS) -#export GOPATH=$(shell go env GOPATH) -export GOPATH=/home/uos/v25:/home/uos/go:/usr/share/gocode +export GOPATH=$(shell go env GOPATH) + ifneq (${shell uname -m}, mips64el) GOBUILD_OPTIONS = -ldflags '-linkmode=external -extldflags "-pie"' endif + + TEST = \ + ${GOPKG_PREFIX}/accounts/keyring \ ${GOPKG_PREFIX}/accounts1 \ ${GOPKG_PREFIX}/accounts1/checkers \ ${GOPKG_PREFIX}/accounts1/logined \ ${GOPKG_PREFIX}/accounts1/users \ ${GOPKG_PREFIX}/appinfo \ - ${GOPKG_PREFIX}/apps1 \ + ${GOPKG_PREFIX}/apps \ ${GOPKG_PREFIX}/audio1 \ ${GOPKG_PREFIX}/bin/backlight_helper \ ${GOPKG_PREFIX}/bin/backlight_helper/ddcci \ @@ -40,26 +43,26 @@ TEST = \ ${GOPKG_PREFIX}/debug \ ${GOPKG_PREFIX}/fprintd1 \ ${GOPKG_PREFIX}/fprintd1/common \ - ${GOPKG_PREFIX}/gesture1 \ + ${GOPKG_PREFIX}/gesture \ ${GOPKG_PREFIX}/graph \ ${GOPKG_PREFIX}/grub2 \ ${GOPKG_PREFIX}/grub_common \ ${GOPKG_PREFIX}/grub_gfx \ ${GOPKG_PREFIX}/housekeeping \ ${GOPKG_PREFIX}/image_effect1 \ - ${GOPKG_PREFIX}/inputdevices1 \ - ${GOPKG_PREFIX}/inputdevices1/iso639 \ + ${GOPKG_PREFIX}/inputdevices \ + ${GOPKG_PREFIX}/inputdevices/iso639 \ ${GOPKG_PREFIX}/iw \ - ${GOPKG_PREFIX}/keybinding1 \ - ${GOPKG_PREFIX}/keybinding1/shortcuts \ - ${GOPKG_PREFIX}/keybinding1/util \ + ${GOPKG_PREFIX}/keybinding \ + ${GOPKG_PREFIX}/keybinding/shortcuts \ + ${GOPKG_PREFIX}/keybinding/util \ ${GOPKG_PREFIX}/langselector1 \ ${GOPKG_PREFIX}/lastore1 \ ${GOPKG_PREFIX}/loader \ - ${GOPKG_PREFIX}/network1 \ - ${GOPKG_PREFIX}/network1/nm \ - ${GOPKG_PREFIX}/network1/nm_generator \ - ${GOPKG_PREFIX}/network1/proxychains \ + ${GOPKG_PREFIX}/network \ + ${GOPKG_PREFIX}/network/nm \ + ${GOPKG_PREFIX}/network/nm_generator \ + ${GOPKG_PREFIX}/network/proxychains \ ${GOPKG_PREFIX}/screenedge1 \ ${GOPKG_PREFIX}/screensaver1 \ ${GOPKG_PREFIX}/service_trigger \ @@ -71,13 +74,13 @@ TEST = \ ${GOPKG_PREFIX}/soundeffect1 \ ${GOPKG_PREFIX}/system/airplane_mode1 \ ${GOPKG_PREFIX}/system/bluetooth1 \ - ${GOPKG_PREFIX}/system/display1 \ - ${GOPKG_PREFIX}/system/gesture1 \ + ${GOPKG_PREFIX}/system/display \ + ${GOPKG_PREFIX}/system/gesture \ ${GOPKG_PREFIX}/system/hostname \ - ${GOPKG_PREFIX}/system/inputdevices1 \ - ${GOPKG_PREFIX}/system/keyevent1 \ + ${GOPKG_PREFIX}/system/inputdevices \ + ${GOPKG_PREFIX}/system/keyevent \ ${GOPKG_PREFIX}/system/lang \ - ${GOPKG_PREFIX}/system/network1 \ + ${GOPKG_PREFIX}/system/network \ ${GOPKG_PREFIX}/system/power1 \ ${GOPKG_PREFIX}/system/power_manager1 \ ${GOPKG_PREFIX}/system/resource_ctl \ @@ -89,8 +92,7 @@ TEST = \ ${GOPKG_PREFIX}/systeminfo1 \ ${GOPKG_PREFIX}/timedate1 \ ${GOPKG_PREFIX}/trayicon1 \ - ${GOPKG_PREFIX}/x_event_monitor1 \ - ${GOPKG_PREFIX}/bin/default-file-manager + ${GOPKG_PREFIX}/x_event_monitor1 #${GOPKG_PREFIX}/timedate1/zoneinfo \ BINARIES = \ @@ -104,8 +106,7 @@ BINARIES = \ dde-lockservice \ dde-authority \ default-terminal \ - dde-greeter-setter \ - default-file-manager + dde-greeter-setter LANGUAGES = $(basename $(notdir $(wildcard misc/po/*.po))) @@ -121,6 +122,9 @@ prepare: out/bin/%: prepare env GOPATH="${CURDIR}/${GOPATH_DIR}:${GOPATH}" ${GOBUILD} -o $@ ${GOBUILD_OPTIONS} ${GOPKG_PREFIX}/bin/${@F} +out/bin/default-file-manager: bin/default-file-manager/main.c + gcc $^ $(shell pkg-config --cflags --libs gio-unix-2.0) $(CFLAGS) -o $@ + out/bin/desktop-toggle: bin/desktop-toggle/main.c gcc $^ $(shell pkg-config --cflags --libs x11) $(CFLAGS) -o $@ @@ -133,7 +137,7 @@ translate: $(addsuffix /LC_MESSAGES/dde-daemon.mo, $(addprefix out/locale/, ${LA pot: deepin-update-pot misc/po/locale_config.ini -POLICIES=accounts1 Grub2 Fprintd1 +POLICIES=accounts grub2 fprintd ts: for i in $(POLICIES); do \ deepin-policy-ts-convert policy2ts misc/polkit-action/org.deepin.dde.$$i.policy.in misc/ts/org.deepin.dde.$$i.policy; \ @@ -179,13 +183,7 @@ install: build install-dde-data install-icons cp -r misc/usr/share/deepin ${DESTDIR}${PREFIX}/share/ mkdir -pv ${DESTDIR}/lib/systemd/user/ - cp -f misc/systemd/services/user/* ${DESTDIR}/lib/systemd/user/ - - mkdir -pv ${DESTDIR}/lib/systemd/system/ - cp -f misc/systemd/services/system/* ${DESTDIR}/lib/systemd/system/ - - mkdir -p $(DESTDIR)$(PREFIX)/lib/systemd/user/dde-session-initialized.target.wants/ - ln -s $(PREFIX)/lib/systemd/user/org.dde.session.Daemon1.service $(DESTDIR)$(PREFIX)/lib/systemd/user/dde-session-initialized.target.wants/org.dde.session.Daemon1.service + cp -f misc/systemd/services/* ${DESTDIR}/lib/systemd/user/ mkdir -pv ${DESTDIR}/lib/systemd/system/ cp -f misc/systemd/system-services/* ${DESTDIR}/lib/systemd/system/ @@ -217,13 +215,15 @@ install: build install-dde-data install-icons mkdir -pv ${DESTDIR}/etc/NetworkManager/conf.d cp -f misc/etc/NetworkManager/conf.d/* ${DESTDIR}/etc/NetworkManager/conf.d/ + mkdir -pv ${DESTDIR}/etc/lightdm/deepin/ + cp -f misc/xsettings/xsettingsd.conf ${DESTDIR}/etc/lightdm/deepin/ + mkdir -pv ${DESTDIR}${PREFIX}/libexec/dde-daemon/ cp -r misc/libexec/dde-daemon/* ${DESTDIR}${PREFIX}/libexec/dde-daemon/ mkdir -pv ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.daemon/ cp -r misc/dsg-configs/*.json ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.daemon/ - cp -f misc/scripts/dde-lock.sh ${DESTDIR}${PREFIX}/lib/deepin-daemon/ install-dde-data: mkdir -pv ${DESTDIR}${PREFIX}/share/dde/ cp -r misc/data ${DESTDIR}${PREFIX}/share/dde/