upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / deepin-daemon / trunk / PKGBUILD
blobbb799b3db88f997f3ea275591255b397fddb77c4
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
3 # Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
5 pkgname=deepin-daemon
6 pkgver=5.14.118
7 _commit=24f095570e5f864c11d2ed7a6560cc69a3ce31c5
8 pkgrel=1
9 pkgdesc='Daemon handling the DDE session settings'
10 arch=('x86_64')
11 url="https://github.com/linuxdeepin/dde-daemon"
12 license=('GPL3')
13 depends=('deepin-desktop-schemas' 'deepin-api' 'deepin-app-services'
14          # TODO:
15          'iso-codes'
16          # accounts
17          'accountsservice'
18          # accounts/grub
19          'deepin-polkit-agent' 'deepin-polkit-agent-ext-gnomekeyring'
20          # accounts/keybinding/systeminfo
21          'deepin-desktop-base'
22          # appearance
23          'fontconfig' 'noto-fonts'
24          # audio/session
25          'pulseaudio'
26          # bin/backlight_helper
27          'ddcutil'
28          'pkgconf'
29          # clipboard
30          'libxfixes'
31          # dock
32          'bamf'
33          # image_effect
34          'deepin-session-ui' 'sudo'
35          # inputdevices
36          'imwheel' 'libxkbfile' 'procps-ng' 'psmisc'
37          # iw
38          'libnl'
39          # keybinding
40          'gvfs'
41          # misc
42          'librsvg'
43          # network
44          'mobile-broadband-provider-info' 'org.freedesktop.secrets' 'xdg-utils'
45          # network/system
46          'systemd'
47          # system
48          'dmidecode' 'libinput' 'lshw' 'upower'
49          # systeminfo
50          'lsb-release' 'udisks2' 'util-linux')
51 makedepends=('golang-github-linuxdeepin-go-dbus-factory' 'golang-deepin-gir' 'golang-deepin-lib'
52              'golang-deepin-dde-api' 'golang-github-nfnt-resize' 'golang-gopkg-yaml.v3' 'sqlite'
53              'deepin-gettext-tools' 'golang-github-fsnotify-fsnotify' 'golang-github-stretchr-testify'
54              'git' 'mercurial' 'python-gobject' 'networkmanager' 'bluez' 'go')
55 optdepends=('networkmanager: for network management support'
56             'bluez: for bluetooth support'
57             'iw: for miracast module'
58             'proxychains-ng: for proxy configuration module')
59 conflicts=('dde-daemon')
60 replaces=('dde-daemon')
61 groups=('deepin')
62 install="$pkgname.install"
63 source=("git+https://github.com/linuxdeepin/dde-daemon.git#commit=$_commit"
64         $pkgname-dpkg-architecture.patch::https://github.com/linuxdeepin/dde-daemon/commit/56b7a2010ab43fe73ee7456527d0792bb7220a35.patch
65         $pkgname-fix-vanilla-libinput.patch
66         'deepin-daemon.sysusers')
67 sha512sums=('SKIP'
68             '87b7acca26338899316219daa300a83c6a2e94bd0f2bea372dfea50218187f81d010da7cd4b2049e1403357868e3394634358a5a7c8c3a7be6d5aa4f84bf8d65'
69             '944b0ae6cf7f613fd00884593c5e5f43aaf0efe4ea7aaa546a06b4367b8da4f2bc486dca640f77743bd1b7b9e4aacf741afe5c5e3ee219c2fdd4cc891ab3d367'
70             '808c02d4fec4cbbb01119bbb10499090199e738b7dd72c28a57dde098eef6132723f3434c151f79e21d9f788c7f7bae8046573ac93ba917afe0e803fbffa6d5a')
72 export GO111MODULE=off
74 prepare() {
75   cd dde-daemon
76   patch -p1 -i ../$pkgname-fix-vanilla-libinput.patch
78   # Revert commit to use dpkg-architecture instead of pkg-config
79   patch -Rp1 -i ../$pkgname-dpkg-architecture.patch
81   export GOPATH="$srcdir/build:/usr/share/gocode"
83   go get github.com/cryptix/wav github.com/axgle/mahonia github.com/msteinert/pam github.com/gosexy/gettext github.com/rickb777/date \
84          github.com/jinzhu/gorm github.com/kelvins/sunrisesunset github.com/mozillazg/go-pinyin github.com/teambition/rrule-go \
85          golang.org/x/xerrors github.com/mattn/go-sqlite3 github.com/godbus/dbus google.golang.org/protobuf/proto \
86          github.com/Lofanmi/pinyin-golang/pinyin github.com/youpy/go-wav github.com/mdlayher/netlink
88   sed -i 's#/usr/share/backgrounds/default_background.jpg#/usr/share/backgrounds/deepin/desktop.jpg#' accounts/user.go
90   # https://github.com/linuxdeepin/developer-center/discussions/3327
91   sed -i 's#/usr/libexec#/usr/lib#' keybinding/shortcuts/system_shortcut.go
92   sed -i 's#${PREFIX}/libexec/#${PREFIX}/lib/#' Makefile
94   sed -i 's|"gopkg.in/yaml.v2"|"gopkg.in/yaml.v3"|' network/nm_generator/utils.go
96   sed -i 's|/etc/os-version|/etc/uos-version|' keybinding/shortcuts/shortcut_manager.go
99 build() {
100   export CGO_CPPFLAGS="${CPPFLAGS}"
101   export CGO_CFLAGS="${CFLAGS}"
102   export CGO_CXXFLAGS="${CXXFLAGS}"
103   export CGO_LDFLAGS="${LDFLAGS}"
104   export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
106   cd dde-daemon
107   
108   make -C network/nm_generator gen-nm-code
109   make
112 package() {
113   cd dde-daemon
114   make DESTDIR="$pkgdir" PAM_MODULE_DIR=usr/lib/security install
116   mv "$pkgdir"{,/usr}/lib/systemd
117   mv "$pkgdir"{,/usr}/lib/udev
118   rmdir "$pkgdir"/lib
120   install -Dm644 ../deepin-daemon.sysusers "$pkgdir/usr/lib/sysusers.d/deepin-daemon.conf"