summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8ef55c4b5ad3b41466e90f89d15b94862cdd7157 (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
59
60
61
62
63
64
65
66
67
68
# Maintainer: grimi <grimi at poczta dot fm>

pkgname=numix-themes-green
pkgver=2.6.2
pkgrel=1
pkgdesc="A flat and light theme with a modern look using Green color (GNOME, MATE, Openbox, Unity, XFCE)"
arch=('any')
url='http://numixproject.org/'
license=('GPL3')
depends=('gtk-engine-murrine')
makedepends=('ruby-bundler' 'imagemagick')
source=("${pkgname%-*}-${pkgver}.tar.gz::https://github.com/numixproject/numix-gtk-theme/archive/${pkgver}.tar.gz")
md5sums=('f7c43c972401c45873f48337f0da2a51')


prepare() {
   cd numix-gtk-theme-${pkgver}
   for FILE in gtk-2.0/gtkrc \
      gtk-3.0/scss/_global.scss \
      gtk-3.0/assets/*.svg \
      gtk-3.20/scss/_global.scss \
      metacity-1/metacity-theme-2.xml \
      metacity-1/metacity-theme-3.xml \
      openbox-3/themerc \
      xfce-notify-4.0/gtkrc \
      xfwm4/themerc \
      xfwm4/*.xpm \
      unity/*.svg \
      index.theme \
      Makefile
   do
      sed -i 's/#f0544c/#697740/Ig'  "${FILE}"
      sed -i 's/#d64937/#697740/Ig'  "${FILE}"
      sed -i 's/#f06860/#697740/Ig'  "${FILE}"
      sed -i 's/#f44336/#697740/Ig'  "${FILE}"
      sed -i 's/#444444/#333333/g'   "${FILE}"
      sed -i 's/#444/#333/g'         "${FILE}"
      sed -i 's/Numix/Numix-Green/I' "${FILE}"
   done


   # fix name change
   cp gtk-3.0/assets/radio-{selected,checked}.svg
   cp gtk-3.0/assets/radio-{selected,checked}-dark.svg

   for FILE in gtk-3.0/assets/*.svg
   do
      if [[ -f ${FILE%.svg}.png ]]
      then
         convert -resize 16x16 -background none "${FILE}" "${FILE%.svg}.png"
      fi
   done

   echo -e "source 'https://rubygems.org'\ngem 'sass'" > Gemfile
}


build() {
   cd numix-gtk-theme-${pkgver}
   bundle install --path .
   make SASS="bundle exec sass"
}


package() {
   cd numix-gtk-theme-${pkgver}
   make SASS="bundle exec sass" DESTDIR="${pkgdir}" install
}