mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Allow panel size and position adjustment
This commit is contained in:
84
Makefile
Normal file
84
Makefile
Normal file
@@ -0,0 +1,84 @@
|
||||
# Basic Makefile
|
||||
|
||||
UUID = onebar@jderose9.github.com
|
||||
BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md
|
||||
EXTRA_MODULES = convenience.js taskbar.js secondaryMenu.js windowPreview.js prefs.js Settings.ui
|
||||
#EXTRA_MEDIA = logo.svg
|
||||
TOLOCALIZE = prefs.js
|
||||
MSGSRC = $(wildcard po/*.po)
|
||||
ifeq ($(strip $(DESTDIR)),)
|
||||
INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions
|
||||
else
|
||||
INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions
|
||||
endif
|
||||
INSTALLNAME = onebar@jderose9.github.com
|
||||
|
||||
# The command line passed variable VERSION is used to set the version string
|
||||
# in the metadata and in the generated zip-file. If no VERSION is passed, the
|
||||
# current commit SHA1 is used as version number in the metadata while the
|
||||
# generated zip file has no string attached.
|
||||
ifdef VERSION
|
||||
VSTRING = _v$(VERSION)
|
||||
else
|
||||
VERSION = $(shell git rev-parse HEAD)
|
||||
VSTRING =
|
||||
endif
|
||||
|
||||
all: extension
|
||||
|
||||
clean:
|
||||
rm -f ./schemas/gschemas.compiled
|
||||
|
||||
extension: ./schemas/gschemas.compiled $(MSGSRC:.po=.mo)
|
||||
|
||||
./schemas/gschemas.compiled: ./schemas/org.gnome.shell.extensions.onebar.gschema.xml
|
||||
glib-compile-schemas ./schemas/
|
||||
|
||||
potfile: ./po/onebar.pot
|
||||
|
||||
mergepo: potfile
|
||||
for l in $(MSGSRC); do \
|
||||
msgmerge -U $$l ./po/onebar.pot; \
|
||||
done;
|
||||
|
||||
./po/onebar.pot: $(TOLOCALIZE) Settings.ui
|
||||
mkdir -p po
|
||||
xgettext -k_ -kN_ -o po/onebar.pot --package-name "OneBar" $(TOLOCALIZE)
|
||||
intltool-extract --type=gettext/glade Settings.ui
|
||||
xgettext -k_ -kN_ --join-existing -o po/onebar.pot Settings.ui.h
|
||||
|
||||
./po/%.mo: ./po/%.po
|
||||
msgfmt -c $< -o $@
|
||||
|
||||
install: install-local
|
||||
|
||||
install-local: _build
|
||||
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
|
||||
mkdir -p $(INSTALLBASE)/$(INSTALLNAME)
|
||||
cp -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/
|
||||
-rm -fR _build
|
||||
echo done
|
||||
|
||||
zip-file: _build
|
||||
cd _build ; \
|
||||
zip -qr "$(UUID)$(VSTRING).zip" .
|
||||
mv _build/$(UUID)$(VSTRING).zip ./
|
||||
-rm -fR _build
|
||||
|
||||
_build: all
|
||||
-rm -fR ./_build
|
||||
mkdir -p _build
|
||||
cp $(BASE_MODULES) $(EXTRA_MODULES) _build
|
||||
#mkdir -p _build/media
|
||||
#cd media ; cp $(EXTRA_MEDIA) ../_build/media/
|
||||
mkdir -p _build/schemas
|
||||
cp schemas/*.xml _build/schemas/
|
||||
cp schemas/gschemas.compiled _build/schemas/
|
||||
mkdir -p _build/locale
|
||||
for l in $(MSGSRC:.po=.mo) ; do \
|
||||
lf=_build/locale/`basename $$l .mo`; \
|
||||
mkdir -p $$lf; \
|
||||
mkdir -p $$lf/LC_MESSAGES; \
|
||||
cp $$l $$lf/LC_MESSAGES/onebar.mo; \
|
||||
done;
|
||||
sed -i 's/"version": -1/"version": "$(VERSION)"/' _build/metadata.json;
|
||||
Reference in New Issue
Block a user