summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2af531914a5f3451b779a55e52dea37aa27b64bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: justforlxz <justforlxz@gmail.com>

pkgname=startdde-git
pkgver=5.6.0.35.r20.ge041aa5
pkgrel=1
pkgdesc="starter of deepin desktop environment"
arch=('x86_64')
url="https://github.com/linuxdeepin/startdde"
license=('GPL3')
depends=('libgnome-keyring')
makedepends=('cmake' 'coffeescript' 'golang-github-linuxdeepin-go-dbus-factory-git' 'golang-deepin-gir-git'
             'golang-deepin-lib-git' 'deepin-api-git' 'go' 'git' 'jq'
             'golang-golang-x-net' 'golang-github-linuxdeepin-go-x11-client-git')
optdepends=('deepin-wm: Legacy 3D window manager'
            'deepin-metacity: Legacy 2D window manager'
            'deepin-kwin: Preferred window manager')
provides=('startdde')
conflicts=('startdde')
groups=('deepin-git')
source=("$pkgname::git://github.com/linuxdeepin/startdde")
sha512sums=('SKIP')

pkgver() {
    cd $pkgname
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  export GOPATH="$srcdir/build:/usr/share/gocode"
  go get -v github.com/cryptix/wav
  go get -v golang.org/x/xerrors
  go get -v github.com/fsnotify/fsnotify
  go get -v github.com/godbus/dbus
  go get -v github.com/godbus/dbus/introspect
  go get -v github.com/godbus/dbus/prop

  sed -i 's/sbin/bin/' $pkgname/Makefile
}

build() {
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"

  cd $pkgname
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install

  # Fix env file permission
  chmod +x "$pkgdir"/etc/X11/Xsession.d/*

  # Don't rely on deepin-session's location
  install -dm755 "$pkgdir"/etc/X11/xinit/xinitrc.d
  mv "$pkgdir"/etc/X11/Xsession.d/* "$pkgdir"/etc/X11/xinit/xinitrc.d/
  rmdir "$pkgdir"/etc/X11/Xsession.d
}