From: Yann Dirson Date: Mon, 20 Oct 2014 08:53:00 +0000 (+0200) Subject: Fix install rule for packaging X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=85112632cec4d792fe298834b0d8ea9d38256135;p=hachu.git Fix install rule for packaging * $(DESTDIR) must be used everywhere * /usr/games/ may not exist * DATADIR ought to be easy to override when autodetection is not needed, to avoid build-dependency on XBoard. --- diff --git a/Makefile b/Makefile index 3917fc3..d0c91a2 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ srcdir = . CC?=gcc CFLAGS?= -O2 -s +DATADIR=`xboard --show-config Datadir` ALL= hachu hachu.6.gz @@ -12,13 +13,14 @@ hachu: hachu.c $(CC) $(CFLAGS) $(LDFLAGS) hachu.c -o hachu install: ${ALL} ${srcdir}/svg/* + install -d -m0755 $(DESTDIR)/usr/games cp -u ${srcdir}/hachu $(DESTDIR)/usr/games install -d -m0755 $(DESTDIR)/usr/share/man/man6 cp -u ${srcdir}/hachu.6.gz $(DESTDIR)/usr/share/man/man6 - install -d -m0755 `xboard --show-config Datadir`/themes/chu - cp -u ${srcdir}/svg/*.svg `xboard --show-config Datadir`/themes/chu - install -d -m0755 `xboard --show-config Datadir`/themes/conf - cp -u ${srcdir}/svg/sho ${srcdir}/svg/chu `xboard --show-config Datadir`/themes/conf + install -d -m0755 $(DESTDIR)$(DATADIR)/themes/chu + cp -u ${srcdir}/svg/*.svg $(DESTDIR)$(DATADIR)/themes/chu + install -d -m0755 $(DESTDIR)$(DATADIR)/themes/conf + cp -u ${srcdir}/svg/sho ${srcdir}/svg/chu $(DESTDIR)$(DATADIR)/themes/conf install -d -m0755 $(DESTDIR)/usr/share/games/plugins/logos cp -u ${srcdir}/logo.png $(DESTDIR)/usr/share/games/plugins/logos/hachu.png install -d -m0755 $(DESTDIR)/usr/share/games/plugins/xboard