Skip to content

Commit

Permalink
chore: Makefile can use go mod
Browse files Browse the repository at this point in the history
move GO111MODULE=off to debain rules

Log:

(cherry picked from commit 0c297a1)
  • Loading branch information
dengbo11 authored and fly602 committed Sep 4, 2024
1 parent 0b484ad commit 6019d64
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 = \
Expand All @@ -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)))

Expand All @@ -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 $@

Expand All @@ -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; \
Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit 6019d64

Please sign in to comment.