summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0bb0270861a9c05d4880051363f85a8f31658895 (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
# Maintainer: justforlxz <justforlxz@gmail.com>

pkgname=deepin-desktop-schemas-git
pkgver=5.11.1.r0.gd0a6dcc
pkgrel=1
pkgdesc='GSettings deepin desktop-wide schemas'
arch=('any')
url="https://github.com/linuxdeepin/deepin-desktop-schemas"
license=('GPL3')
depends=('dconf' 'deepin-gtk-theme' 'deepin-icon-theme' 'deepin-sound-theme')
makedepends=('git' 'python' 'go' 'golang-deepin-lib')
conflicts=('deepin-artwork-themes' 'deepin-desktop-schemas')
provides=('deepin-desktop-schemas')
groups=('deepin-git')
source=("$pkgname::git+https://github.com/linuxdeepin/deepin-desktop-schemas")
sha512sums=('SKIP')

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

prepare() {
  cd $pkgname
  export GOPATH="$srcdir/build:/usr/share/gocode"
  # fix default background url
  sed -i "s#/usr/share/backgrounds/default_background.jpg#/usr/share/backgrounds/deepin/desktop.jpg#" \
    overrides/common/com.deepin.wrap.gnome.desktop.override schemas/com.deepin.dde.appearance.gschema.xml
  # fix network checker url
  sed -i "s#'https://www.chinauos.com', 'https://www.uniontech.com'#'https://www.archlinux.org'#" schemas/com.deepin.dde.network-utils.gschema.xml
}

build() {
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
  export GOPATH="$srcdir/build:/usr/share/gocode"
  export GO111MODULE=off

  cd $pkgname
  make ARCH=x86
}

check() {
  cd $pkgname
  export GOPATH="$srcdir/build:/usr/share/gocode"
  export GO111MODULE=off
  make test
}

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