summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurentTreguier2017-03-28 15:45:34 +0200
committerLaurentTreguier2017-03-28 15:46:03 +0200
commitecc0f1843892757008a833a07a5f7cec667e1354 (patch)
treef99ea394a0e8a7bda6a69312c85117aa01e7a7cb
parent4109893b2d1bb9cb643cfe99ea84ca3519ce97d4 (diff)
downloadaur-numix-themes-electric.tar.gz
2.6.6
-rw-r--r--.SRCINFO16
-rw-r--r--Gemfile2
-rw-r--r--PKGBUILD74
3 files changed, 62 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54b64ee7cbb..f5f83950107 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,21 @@
# Generated by mksrcinfo v8
-# Sat Jun 11 19:39:06 UTC 2016
+# Tue Mar 28 13:44:36 UTC 2017
pkgbase = numix-themes-electric
pkgdesc = A flat and light theme with a modern look using Arch Linux colors (GNOME, Openbox, Unity, Xfce)
- pkgver = 2.5.1
- pkgrel = 2
+ pkgver = 2.6.6
+ pkgrel = 1
url = http://numixproject.org/
arch = any
license = GPL3
+ makedepends = glib2
+ makedepends = gdk-pixbuf2
+ makedepends = ruby-bundler
+ makedepends = inkscape
depends = gtk-engine-murrine
- source = numix-themes-2.5.1.tar.gz::https://github.com/shimmerproject/Numix/archive/v2.5.1.tar.gz
- md5sums = 4468cb3f2fe0d01e823df7c310778787
+ source = numix-themes-2.6.6.tar.gz::https://github.com/numixproject/numix-gtk-theme/archive/2.6.6.tar.gz
+ source = Gemfile
+ md5sums = 7533cdecb2e9f875cd7efc881b8d65a3
+ md5sums = 2a6b61ff91955c37fa60a972a67631cf
pkgname = numix-themes-electric
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 00000000000..ccb615146e4
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,2 @@
+source "https://rubygems.org"
+gem "sass" \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 4ed7b5d05e2..0b07d160bc3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,64 @@
pkgname=numix-themes-electric
-pkgver=2.5.1
-pkgrel=2
+pkgver=2.6.6
+pkgrel=1
pkgdesc='A flat and light theme with a modern look using Arch Linux colors (GNOME, Openbox, Unity, Xfce)'
arch=('any')
url='http://numixproject.org/'
license=('GPL3')
+makedepends=('glib2' 'gdk-pixbuf2' 'ruby-bundler' 'inkscape')
depends=('gtk-engine-murrine')
-source=("numix-themes-${pkgver}.tar.gz::https://github.com/shimmerproject/Numix/archive/v${pkgver}.tar.gz")
-md5sums=('f480ae44848186818a4c5a884c250388')
+source=("numix-themes-${pkgver}.tar.gz::https://github.com/numixproject/numix-gtk-theme/archive/${pkgver}.tar.gz"
+ 'Gemfile')
+md5sums=('7533cdecb2e9f875cd7efc881b8d65a3'
+ '2a6b61ff91955c37fa60a972a67631cf')
+
+_electric_color='#00BFFF'
+_get_color() {
+ grep -E "@define-color\\s+\\w*$1" src/gtk-3.20/dist/gtk-dark.css | head -n1 | cut -d' ' -f3 | cut -d';' -f1
+}
prepare() {
- names='base_color bg_color text_color fg_color selected_bg_color selected_fg_color tooltip_bg_color tooltip_fg_color'
-
- cd numix-gtk-theme-${pkgver}
-
+ cd ${srcdir}/numix-gtk-theme-${pkgver}
+ sed -i 's/\$variant: "light";/\$variant: "dark";/' src/gtk-3.{,2}0/scss/gtk.scss
+
+ for name in selected_bg_color link_color
+ do
+ sed -i "s/\$${name}: #.\{6\};/\$${name}: ${_electric_color};/" src/gtk-3.{,2}0/scss/_global.scss
+ done
+
+ rm src/assets/*.png
+ sed -i "s/fill:#f1544d/fill:${_electric_color}/g" src/assets/all-assets.svg
+}
+
+build() {
+ cd ${srcdir}/numix-gtk-theme-${pkgver}/scripts
+ ./render-assets.sh
+ cd ..
+
+ bundle install --path .
+ make SASS="bundle exec sass"
+
+ names='bg_color fg_color base_color text_color selected_bg_color selected_fg_color tooltip_bg_color tooltip_fg_color titlebar_bg_color titlebar_fg_color menubar_bg_color menubar_fg_color toolbar_bg_color toolbar_fg_color menu_bg_color menu_fg_color panel_bg_color panel_fg_color'
+
for name in $names
do
- color=$(grep "@define-color\\s\+$name" gtk-3.0/gtk-dark.css | head -n1 | cut -d' ' -f3 | cut -d';' -f1)
- sed -i "s/$name:#.\{6\}/$name:$color/" gtk-2.0/gtkrc
+ color=$(_get_color $name)
+
+ if [[ $color = "@"* ]]
+ then
+ color=$(_get_color $(echo $color | cut -d'@' -f2))
+ fi
+
+ sed -i "s/$name:#.\{6\}/$name:$color/" src/gtk-2.0/gtkrc
done
-
- sed -i 's/selected_bg_color:#.\{6\}/selected_bg_color:#00BFFF/' gtk-2.0/gtkrc
- sed -i 's/selected_fg_color:#.\{6\}/selected_fg_color:#000000/' gtk-2.0/gtkrc
- sed -i 's/@define-color selected_bg_color #.\{6\}/@define-color selected_bg_color #00BFFF/' gtk-3.0/gtk-dark.css
- sed -i 's/@define-color selected_fg_color #.\{6\}/@define-color selected_fg_color #000000/' gtk-3.0/gtk-dark.css
-
- cd gtk-3.0
-
- rm -f gtk.css
- mv gtk-dark.css gtk.css
+
+ sed -i "s/selected_bg_color:#.\{6\}/selected_bg_color:${_electric_color}/" src/gtk-2.0/gtkrc
+ sed -i "s/link_color:#.\{6\}/link_color:${_electric_color}/" src/gtk-2.0/gtkrc
}
package() {
- cd numix-gtk-theme-${pkgver}
-
- install -dm 755 "${pkgdir}"/usr/share/themes/Numix-Electric
- rm -rf .git .gitignore CREDITS LICENSE README.md
- cp -dr --no-preserve='ownership' * "${pkgdir}"/usr/share/themes/Numix-Electric/
+ cd ${srcdir}/numix-gtk-theme-${pkgver}
+ make SASS="bundle exec sass" DESTDIR="${pkgdir}" install
+ cd "${pkgdir}"/usr/share/themes
+ mv Numix 'Numix Electric'
}