Skip to content

Commit

Permalink
chore: move packaging stuff from themix gui repo
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Mar 16, 2020
1 parent 2c9528e commit aac40e9
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ pkg/
test_results/

scss-link

__pycache__/
33 changes: 33 additions & 0 deletions Makefile_oomox_plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
DESTDIR = ./distrib
PREFIX = /usr
APPDIR = /opt/oomox

DEST_APPDIR = $(DESTDIR)$(APPDIR)
DEST_PLUGIN_DIR = $(DESTDIR)$(APPDIR)/plugins
DEST_PREFIX = $(DESTDIR)$(PREFIX)

.PHONY: install
install:
$(eval PLUGIN_NAME := "theme_oomox")
$(eval CLI_NAME := "oomox-cli")
$(eval PACKAGING_TMP_DIR := $(shell mktemp -d))

cp -prf \
packaging/ \
$(PACKAGING_TMP_DIR)/
sed -i -e 's|/opt/oomox/|$(APPDIR)/|g' $(PACKAGING_TMP_DIR)/packaging/bin/*
chmod a+x "$(PACKAGING_TMP_DIR)/packaging/bin/"*
install -d $(DEST_PREFIX)/bin/
install -Dp -m 755 "$(PACKAGING_TMP_DIR)/packaging/bin/$(CLI_NAME)" "$(DEST_PREFIX)/bin/"

mkdir -p $(DEST_PLUGIN_DIR)/$(PLUGIN_NAME)
cp -prf \
./change_color.sh \
./gtk_preview_css \
./Makefile \
./oomox_plugin.py \
./scripts/ \
./src/ \
$(DEST_PLUGIN_DIR)/$(PLUGIN_NAME)/

all: install
61 changes: 61 additions & 0 deletions packaging/arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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
_reponame=oomox-gtk-theme
pkgname="${_pkgname}-git"
pkgver=1.11.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."
arch=('x86_64' 'i686')
url="https://github.com/themix-project/oomox-gtk-theme"
license=('GPL3')
source=(
"${_reponame}::git+https://github.com/themix-project/oomox-gtk-theme.git#branch=master"
)
md5sums=(
"SKIP"
)
depends=(
'gtk3'
'glib2' # oomox, materia, arc
'gdk-pixbuf2' # oomox, materia, arc
'gtk-engine-murrine' # oomox, materia, arc
'gtk-engines' # oomox, materia, arc
'sassc' # oomox, materia, arc
'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
)
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
_plugin_name=theme_oomox

cd "${srcdir}/${_reponame}"
make -f Makefile_oomox_plugin DESTDIR="${pkgdir}" APPDIR="${_oomox_dir}" PREFIX="/usr" install
python -O -m compileall "${pkgdir}${_oomox_dir}/plugins/${_plugin_name}" -d "${_oomox_dir}/plugins/${_plugin_name}"
}

# vim: ft=PKGBUILD
3 changes: 3 additions & 0 deletions packaging/bin/oomox-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd /opt/oomox/ &&
exec ./plugins/theme_oomox/gtk-theme/change_color.sh "$@"

0 comments on commit aac40e9

Please sign in to comment.