From 4ebcb44c6349a4571fbc8e61546cf97a2bb31f2d Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Wed, 27 Jun 2018 08:02:35 +0000 Subject: [PATCH] Make installing to a PREFIX easier and add appdata --- misc/unix/grafx2.appdata.xml | 40 ++++++++++++++++++++++++++++++++++++ src/Makefile | 24 ++++++++++++---------- 2 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 misc/unix/grafx2.appdata.xml diff --git a/misc/unix/grafx2.appdata.xml b/misc/unix/grafx2.appdata.xml new file mode 100644 index 00000000..2f683d87 --- /dev/null +++ b/misc/unix/grafx2.appdata.xml @@ -0,0 +1,40 @@ + + + grafx2.desktop + CC-0 + GPL-2.0 and CeCILL-2 + GrafX2 + A bitmap paint program specialized in 256 color drawing + + +

+ GrafX2 is a bitmap paint program inspired by the Amiga programs ​Deluxe Paint + and Brilliance. Specialized in 256-color drawing, it includes a very large + number of tools and effects that make it particularly suitable for pixel + art, game graphics, and generally any detailed graphics painted with a + mouse. +

+
+ + + + Zoom functionality + http://grafx2.chez.com/data/medias/screenshots/04-zoom.png + + + Grid mode + http://grafx2.chez.com/data/medias/screenshots/06-grid.png + + + The splash screen + http://grafx2.chez.com/data/medias/screenshots/01-splash.png + + + + http://grafx2.tk + https://pulkomandy.tk/projects/GrafX2 + + + grafx2 + +
diff --git a/src/Makefile b/src/Makefile index b08dc644..dee5c5cd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -23,12 +23,12 @@ # along with Grafx2; if not, see # Overridable defaults - prefix = /usr/local - exec_prefix = $(prefix) + PREFIX ?= /usr/local + exec_prefix = $(PREFIX) bindir = $(exec_prefix)/bin - datarootdir = $(prefix)/share + datarootdir = $(PREFIX)/share datadir = $(datarootdir) - pixmapdir = $(datarootdir)/icons + pixmapdir = $(datarootdir)/icons/hicolor/scalable/apps # Compile with OPTIM=0 to disable gcc optimizations, to enable debug. STRIP = strip @@ -325,8 +325,8 @@ endif STACK = stack FIX_FLAGS = flags FCLOPT = - COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) - LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT) + COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -I$(PREFIX)/include `$(PREFIX)/bin/libpng12-config --cflags` `$(PREFIX)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) + LOPT = -static -m68020-60 -lSDL_image `$(PREFIX)/bin/sdl-config --libs` -L$(PREFIX)/lib -ltiff -ljpeg `$(PREFIX)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT) else ifeq ($(PLATFORM),syllable) #11 #Syllable @@ -449,8 +449,8 @@ endif STACK = m68k-atari-mint-stack FIX_FLAGS = m68k-atari-mint-flags FCLOPT = - COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -ffast-math -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) - LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) -lm $(LAYERLOPT) -Wl,--stack,8k + COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -ffast-math -O$(OPTIM) -I$(PREFIX)/include `$(PREFIX)/bin/libpng12-config --cflags` `$(PREFIX)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) + LOPT = -static -m68020-60 -lSDL_image `$(PREFIX)/bin/sdl-config --libs` -L$(PREFIX)/lib -ltiff -ljpeg `$(PREFIX)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) -lm $(LAYERLOPT) -Wl,--stack,8k else # Compiles a regular linux executable for the native platform @@ -506,7 +506,7 @@ ifndef ($(ATARICROSS,1)) TTFLABEL = -nottf else TTFCOPT = - TTFLOPT = -L$(prefix)/lib -lSDL_ttf $(FCLOPT) + TTFLOPT = -L$(PREFIX)/lib -lSDL_ttf $(FCLOPT) TTFLIBS = bin/libfreetype-6.dll bin/SDL_ttf.dll TTFLABEL = endif @@ -518,7 +518,7 @@ else TTFLABEL = -nottf else TTFCOPT = - TTFLOPT = -L$(prefix)/lib -lSDL_ttf $(FCLOPT) + TTFLOPT = -L$(PREFIX)/lib -lSDL_ttf $(FCLOPT) TTFLIBS = TTFLABEL = endif @@ -805,6 +805,7 @@ install : $(BIN) test -d $(DESTDIR)$(datadir)/grafx2/scripts/samples_2.4/picture/others-8bit || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples_2.4/picture/others-8bit test -d $(DESTDIR)$(datadir)/grafx2/scripts/samples_2.4/picture/others-8bit/lib || $(MKDIR) $(DESTDIR)$(datadir)/grafx2/scripts/samples_2.4/picture/others-8bit/lib test -d $(DESTDIR)$(datadir)/applications || $(MKDIR) $(DESTDIR)$(datadir)/applications + test -d $(DESTDIR)$(datadir)/metainfo || $(MKDIR) $(DESTDIR)$(datadir)/metainfo test -d $(DESTDIR)$(pixmapdir) || $(MKDIR) $(DESTDIR)$(pixmapdir) # Copy files @@ -816,6 +817,7 @@ install : $(BIN) for f in $(SCRIPT_FILES:../share/%=%); do cp "../share/$$f" "$(DESTDIR)$(datadir)/$$f" ; done # Icon and desktop file for debian $(CP) ../misc/unix/grafx2.desktop $(DESTDIR)$(datadir)/applications/ + $(CP) ../misc/unix/grafx2.appdata.xml $(DESTDIR)$(datadir)/metainfo/ $(CP) ../misc/unix/grafx2.xpm $(DESTDIR)$(pixmapdir) $(CP) ../share/icons/grafx2.svg $(DESTDIR)$(pixmapdir) @echo Install complete @@ -842,6 +844,7 @@ uninstall : $(if $(wildcard $(DESTDIR)$(datadir)/grafx2),$(RMDIR) $(DESTDIR)$(datadir)/grafx2,) # Icon and desktop file for debian $(DELCOMMAND) $(DESTDIR)$(datadir)/applications/grafx2.desktop + $(DELCOMMAND) $(DESTDIR)$(datadir)/metainfo/grafx2.appdata.xml $(DELCOMMAND) $(DESTDIR)$(pixmapdir)/grafx2.xpm $(DELCOMMAND) $(DESTDIR)$(pixmapdir)/grafx2.svg @echo Uninstall complete @@ -852,4 +855,3 @@ valgrind: $(BIN) valgrind --suppressions=../valgrind.grafx2.suppr --leak-check=full --show-leak-kinds=all --num-callers=20 $(BIN) -include Makefile.dep -