gtkradiant/apple/Makefile

77 lines
2.2 KiB
Makefile
Raw Permalink Normal View History

# Makefile for GtkRadiant.app, requires http://macdylibbundler.sourceforge.net/
BUILD = ../build
INSTALL = ../install
TARGET = target
RESOURCES = $(TARGET)/GtkRadiant.app/Contents/Resources
2013-09-11 22:39:43 +00:00
BINDIR = $(RESOURCES)/install
CONFDIR = $(RESOURCES)/etc
DATADIR = $(RESOURCES)/share
LIBDIR = $(RESOURCES)/lib
2016-05-08 13:22:55 +00:00
VERSION = 1.6.5
DMG = $(TARGET)/GtkRadiant-$(VERSION).dmg
VOLUME_NAME = "GtkRadiant $(VERSION)"
2013-09-12 00:44:05 +00:00
# We must rewrite some Gtk configuration files, which vary from environment to
# environment depending on where you've installed MacPorts. Fun!
MACPORTS_PREFIX := $(shell which port | sed 's:/bin/port::')
PREFIX_SED_EXPR = "s:$(MACPORTS_PREFIX):@executable_path/..:g"
all: install bundle
-pre-install:
install -d $(TARGET)
cp -r GtkRadiant.app $(TARGET)
find $(TARGET) -name .turd -delete
-gtk-runtime-gdk-pixbuf-2.0:
2013-09-12 00:44:05 +00:00
cp -r $(MACPORTS_PREFIX)/lib/gdk-pixbuf-2.0 $(LIBDIR)
find $(LIBDIR)/gdk-pixbuf-2.0 -type f ! -name "*.so" -delete
gdk-pixbuf-query-loaders | sed $(PREFIX_SED_EXPR) > \
$(CONFDIR)/gtk-2.0/gdk-pixbuf.loaders
2016-05-08 13:22:55 +00:00
-gtk-runtime: -gtk-runtime-gdk-pixbuf-2.0
2013-09-12 00:44:05 +00:00
cp -r $(MACPORTS_PREFIX)/lib/gtk-2.0 $(LIBDIR)
find $(LIBDIR)/gtk-2.0 -type f ! -name "*.so" -delete
rm -rf $(LIBDIR)/gtk-2.0/{includes,modules}
rm -rf $(LIBDIR)/gtk-2.0/*/printbackends
2013-09-12 00:44:05 +00:00
cp -r $(MACPORTS_PREFIX)/share/themes/Default $(RESOURCES)/share
gtk-query-immodules-2.0 | sed $(PREFIX_SED_EXPR) > \
$(CONFDIR)/gtk-2.0/gtk.immodules
install: -pre-install -gtk-runtime
cp -r $(INSTALL) $(RESOURCES)
rm -rf `find $(INSTALL)/installs -type d -name .svn`
bundle:
2013-10-12 16:29:11 +00:00
# The Radiant plugins (modules) are a little funky
# Some of them are actually linked against the build directory
test -L build || ln -s $(BUILD)
dylibbundler -b \
2013-09-11 22:39:43 +00:00
-x $(BINDIR)/radiant.bin \
-x $(BINDIR)/q3map2 \
-x $(BINDIR)/q3map2_urt \
-x $(BINDIR)/q3data \
`find $(BINDIR)/modules -name "*.so" | xargs -I {} echo -x {}` \
`find $(LIBDIR) -name "*.so" | xargs -I {} echo -x {}` \
-d $(LIBDIR) -of -p @executable_path/../lib
2013-10-12 16:29:11 +00:00
rm -f build
image:
find $(TARGET) -name .DS_Store -delete
ln -f -s /Applications $(TARGET)/Applications
hdiutil create -ov $(DMG) -srcfolder $(TARGET) -volname $(VOLUME_NAME)
rm $(TARGET)/Applications
clean:
rm -rf $(TARGET)/*