Skip to content

Commit

Permalink
chore(packaging: arch): prepare PKGBUILD for GUI and gnomecolors icon…
Browse files Browse the repository at this point in the history
…s plugin (re: #129)
  • Loading branch information
actionless committed Mar 16, 2020
1 parent 7bd6e2f commit c91296c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packaging/arch/PKGBUILD_gui
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ makedepends=(
'git'
)
optdepends=(
'xorg-xrdb: for the `xresources` theme'
'themix-icons-gnome-colors: Icons Style plugin'
'themix-theme-oomox: Theme Style plugin'
'xorg-xrdb: for the `xresources` theme'
)
provides=('themix-gui')
conflicts=('themix-gui')
Expand Down
67 changes: 67 additions & 0 deletions packaging/arch/PKGBUILD_icons_gnome_colors
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Maintainer: Yauhen Kirylau <actionless DOT loveless PLUS aur AT gmail MF com>
# Upstream URL: https://github.com/themix-project/oomox-gtk-theme

_pkgname=themix-icons-gnome-colors
_reponame=gnome-colors-icon-theme
pkgname="${_pkgname}-git"
pkgver=5.5.5
pkgrel=1
pkgdesc="Gnome-Colors icons plugin for Themix GUI designer"
arch=('x86_64' 'i686')
url="https://github.com/themix-project/gnome-colors-icon-theme"
license=('GPL3')
source=(
"git+https://github.com/themix-project/oomox.git#branch=master"
"${_reponame}::git+https://github.com/themix-project/gnome-colors-icon-theme.git#branch=master"
)
md5sums=(
"SKIP"
"SKIP"
)
depends=(
'librsvg' # oomox, gnome-colors
'sed' # oomox, materia, arc, gnome-colors, archdroid
'findutils' # oomox, materia, arc, gnome-colors, arch-droid
'grep' # oomoxify, oomox, materia, arc, gnome-colors
'bc' # oomoxify, oomox, materia, arc, gnome-colors
'imagemagick' # gnome-colors
)
makedepends=(
'git'
'python'
)
optdepends=(
'themix-gui: GUI'
)
options=(
'!strip'
)
provides=($_pkgname)
conflicts=($_pkgname)

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

package() {
_oomox_dir=/opt/oomox

_oomox_dir=/opt/oomox
_plugin_name=icons_gnomecolors
_plugin_subpath="/${_reponame}"

pkg_tmp_dir="${pkgdir}/_tmp"
rm -fr "$pkg_tmp_dir"
cp -r "${srcdir}/oomox" "$pkg_tmp_dir"
rm -rf "${pkg_tmp_dir}/plugins/${_plugin_name}${_plugin_subpath}"
cp -r "${srcdir}/${_reponame}" "${pkg_tmp_dir}/plugins/${_plugin_name}${_plugin_subpath}"

cd "$pkg_tmp_dir"
make DESTDIR="${pkgdir}" APPDIR="${_oomox_dir}" PREFIX="/usr" install_icons_gnomecolors
rm -fr "$pkg_tmp_dir"

python -O -m compileall "${pkgdir}${_oomox_dir}/plugins/${_plugin_name}" -d "${_oomox_dir}/plugins/${_plugin_name}"
}

# vim: ft=PKGBUILD
32 changes: 21 additions & 11 deletions packaging/arch/PKGBUILD_theme_oomox
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Maintainer: Yauhen Kirylau <actionless DOT loveless PLUS aur AT gmail MF com>
# Upstream URL: https://github.com/themix-project/oomox-gtk-theme

pkgname=themix-theme-oomox-git
_pkgname=themix-theme-oomox
_reponame=oomox-gtk-theme
pkgname="${_pkgname}-git"
pkgver=1.11.1
pkgrel=1
pkgrel=3
pkgdesc="Oomox theme plugin
(GTK2, GTK3, Cinnamon, Metacity, Openbox, Qt5ct, Unity, Xfwm) for Themix GUI designer.
Have a hack for HiDPI in GTK2."
Expand All @@ -12,7 +14,7 @@ url="https://github.com/themix-project/oomox-gtk-theme"
license=('GPL3')
source=(
"git+https://github.com/themix-project/oomox.git#branch=master"
"git+https://github.com/themix-project/oomox-gtk-theme.git#branch=master"
"${_reponame}::git+https://github.com/themix-project/oomox-gtk-theme.git#branch=master"
)
md5sums=(
"SKIP"
Expand All @@ -33,30 +35,38 @@ depends=(
)
makedepends=(
'git'
'python'
)
optdepends=(
'themix-gui: GUI'
)
options=(
'!strip'
)
provides=('themix-theme-oomox')
conflicts=('themix-theme-oomox')
provides=($_pkgname)
conflicts=($_pkgname)

pkgver() {
cd "${srcdir}/oomox-gtk-theme"
cd "${srcdir}/${_reponame}"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
_oomox_dir=/opt/oomox
_oomox_gui_dir=${_oomox_dir}/oomox_gui
cd "${srcdir}/oomox"
_plugin_name=theme_oomox
_plugin_subpath="/gtk-theme"

rm -fr plugins/theme_oomox/gtk-theme
mv "${srcdir}/oomox-gtk-theme" plugins/theme_oomox/gtk-theme
pkg_tmp_dir="${pkgdir}/_tmp"
rm -fr "$pkg_tmp_dir"
cp -r "${srcdir}/oomox" "$pkg_tmp_dir"
rm -rf "${pkg_tmp_dir}/plugins/${_plugin_name}${_plugin_subpath}"
cp -r "${srcdir}/${_reponame}" "${pkg_tmp_dir}/plugins/${_plugin_name}${_plugin_subpath}"

cd "$pkg_tmp_dir"
make DESTDIR="${pkgdir}" APPDIR="${_oomox_dir}" PREFIX="/usr" install_theme_oomox
python -O -m compileall ${pkgdir}${_oomox_gui_dir} -d ${_oomox_gui_dir}
rm -fr "$pkg_tmp_dir"

python -O -m compileall "${pkgdir}${_oomox_dir}/plugins/${_plugin_name}" -d "${_oomox_dir}/plugins/${_plugin_name}"
}

# vim: ft=PKGBUILD

0 comments on commit c91296c

Please sign in to comment.