From c91296c0b7f374b8ab04f1608deb1b214e5b3358 Mon Sep 17 00:00:00 2001 From: actionless Date: Mon, 16 Mar 2020 04:12:26 +0100 Subject: [PATCH] chore(packaging: arch): prepare PKGBUILD for GUI and gnomecolors icons plugin (re: #129) --- packaging/arch/PKGBUILD_gui | 3 +- packaging/arch/PKGBUILD_icons_gnome_colors | 67 ++++++++++++++++++++++ packaging/arch/PKGBUILD_theme_oomox | 32 +++++++---- 3 files changed, 90 insertions(+), 12 deletions(-) create mode 100644 packaging/arch/PKGBUILD_icons_gnome_colors diff --git a/packaging/arch/PKGBUILD_gui b/packaging/arch/PKGBUILD_gui index 702750318..fec02805a 100644 --- a/packaging/arch/PKGBUILD_gui +++ b/packaging/arch/PKGBUILD_gui @@ -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') diff --git a/packaging/arch/PKGBUILD_icons_gnome_colors b/packaging/arch/PKGBUILD_icons_gnome_colors new file mode 100644 index 000000000..56bda60e7 --- /dev/null +++ b/packaging/arch/PKGBUILD_icons_gnome_colors @@ -0,0 +1,67 @@ +# Maintainer: Yauhen Kirylau +# 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 diff --git a/packaging/arch/PKGBUILD_theme_oomox b/packaging/arch/PKGBUILD_theme_oomox index bfa30d448..5e470d110 100644 --- a/packaging/arch/PKGBUILD_theme_oomox +++ b/packaging/arch/PKGBUILD_theme_oomox @@ -1,9 +1,11 @@ # Maintainer: Yauhen Kirylau # 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." @@ -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" @@ -33,6 +35,7 @@ depends=( ) makedepends=( 'git' + 'python' ) optdepends=( 'themix-gui: GUI' @@ -40,23 +43,30 @@ optdepends=( 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