diff --git a/debian/dj64-dev.install b/debian/dj64-dev.install index a13db84f..c3447766 100644 --- a/debian/dj64-dev.install +++ b/debian/dj64-dev.install @@ -7,3 +7,4 @@ usr/bin/* usr/share/pkgconfig/dj64.pc usr/share/pkgconfig/dj64static.pc usr/share/man/man1/* +usr/share/doc/dj64/* diff --git a/demos/makefile b/demos/makefile index 9f2855f5..7cba913d 100644 --- a/demos/makefile +++ b/demos/makefile @@ -1,3 +1,7 @@ +TOP ?= .. +PREFIX ?= /usr/local +INSTALL ?= install + all: $(MAKE) -C hello $(MAKE) -C helloasm @@ -12,3 +16,12 @@ clean: $(MAKE) -C hello clean $(MAKE) -C helloasm clean $(MAKE) -C rmcb clean + +src_install: clean + for i in `find . -maxdepth 1 -type d ! -path . -printf '%P\n'`; do \ + $(INSTALL) -d $(DESTDIR)$(PREFIX)/share/doc/dj64/demos/$$i; \ + $(INSTALL) -m 0644 $$i/* $(DESTDIR)$(PREFIX)/share/doc/dj64/demos/$$i; \ + done + +src_uninstall: + $(RM) -r $(DESTDIR)$(PREFIX)/share/doc/dj64 diff --git a/dj64.spec.rpkg b/dj64.spec.rpkg index 88067ece..ff7024e1 100644 --- a/dj64.spec.rpkg +++ b/dj64.spec.rpkg @@ -82,7 +82,8 @@ This package contains tools and headers for building dj64-enabled programs. %{_bindir}/* %{_datadir}/pkgconfig/dj64.pc %{_datadir}/pkgconfig/dj64static.pc -%doc %{_mandir}/man1/* +%{_mandir}/man1/* +%{_docdir}/dj64 %end %package dj64-devel-static diff --git a/makefile b/makefile index 9981790f..eaa6d253 100644 --- a/makefile +++ b/makefile @@ -97,7 +97,7 @@ install_djdev64: @echo @echo "Done installing. You may need to run \"sudo ldconfig\" now." -install: install_dj64 install_djdev64 +install: install_dj64 install_djdev64 install_demos uninstall: $(RM) -r $(DESTDIR)$(PREFIX)/bin/dj64-gcc @@ -112,6 +112,7 @@ uninstall: $(RM) $(DESTDIR)$(LIBDIR)/$(notdir $(DJSTUB64DEVL)) $(RM) $(DESTDIR)$(LIBDIR)/$(notdir $(DJSTUB64LIB)) ldconfig + $(MAKE) -C demos src_uninstall clean: demos_clean $(MAKE) -C src clean @@ -142,3 +143,6 @@ demos_djgpp: demos_clean: $(MAKE) -C demos clean + +install_demos: + $(MAKE) -C demos src_install