-dist:
- pax -w -x ustar -s '/^/sudo-$(VERSION)\//' -f ../sudo-$(VERSION).tar \
- $(DISTFILES)
- gzip -9f ../sudo-$(VERSION).tar
- ls -l ../sudo-$(VERSION).tar.gz
-
-bindist:
- ( \
- ARCH=`uname -m|sed 's:/:_:g'`+`uname -sr|sed 's/ /_/g'` ; \
- mkdir tmp.$$ARCH ; \
- tdir=tmp.$$ARCH/sudo-$(VERSION) ; \
- mkdir $$tdir ; \
- for i in $(BINFILES) ; do \
- if [ -f $$i ]; then \
- cp $$i $$tdir ; \
- elif [ -f $(srcdir)/$$i ]; then \
- cp $(srcdir)/$$i $$tdir ; \
- else \
- echo cannot find $$i ; \
- exit 1 ; \
- fi ; \
- done ; \
- if [ -f sudo_noexec.la ]; then \
- cp libtool $$tdir ; \
- $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la `pwd`/$$tdir ; \
- ln $$tdir/sudo_noexec.la $$tdir/sudo_noexec.lai ; \
- ln -s . $$tdir/.libs ; \
- fi ; \
- cp $(srcdir)/INSTALL.binary $$tdir/INSTALL ; \
- sh ./config.status --file=Makefile.binary && cp Makefile.binary $$tdir/Makefile ; \
- strip $$tdir/sudo ; \
- strip $$tdir/visudo ; \
- cd tmp.$$ARCH && tar Ocf ../sudo-$(VERSION)-$$ARCH.tar sudo-$(VERSION) && cd .. ; \
- gzip -f --best sudo-$(VERSION)-$$ARCH.tar ; \
- rm -rf tmp.$$ARCH ; \
- )
-
-depot:
- ( \
- tdir=tmp.depot ; \
- mkdir $$tdir ; \
- for i in sudo visudo sudo.man visudo.man sudoers.man sudoers ChangeLog HISTORY LICENSE README TROUBLESHOOTING UPGRADE sample.syslog.conf sample.sudoers; do \
- if [ -f $$i ]; then \
- cp $$i $$tdir ; \
- elif [ -f $(srcdir)/$$i ]; then \
- cp $(srcdir)/$$i $$tdir ; \
- else \
- echo cannot find $$i ; \
- exit 1 ; \
- fi ; \
- done ; \
- if [ -f sudo_noexec.la ]; then \
- cp libtool $$tdir ; \
- $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la `pwd`/$$tdir ; \
- fi ; \
- sed 's/@VERSION@/$(VERSION)/g' <$(srcdir)/sudo.psf >$$tdir/sudo.psf ; \
- printf '#!/sbin/sh\nrm -f /usr/local/bin/sudoedit\nln /usr/local/bin/sudo /usr/local/bin/sudoedit\n' > $$tdir/sudo-exec.postinstall ; \
- printf '#!/sbin/sh\nrm -f /usr/local/man/man1m/sudoedit.1m\nln /usr/local/man/man1m/sudo.1m /usr/local/man/man1m/sudoedit.1m\n' > $$tdir/sudo-man.postinstall ; \
- printf '#!/sbin/sh\nif [ ! -s /etc/sudoers ]; then\n\techo installing /usr/local/doc/sudo/sudoers as /etc/sudoers\n\techo use /usr/local/sbin/visudo to configure sudo\n\tcp /usr/local/doc/sudo/sudoers /etc/sudoers\n\tchmod 440 /etc/sudoers\n\tchown root:root /etc/sudoers\nfi\n' > $$tdir/sudo-config.postinstall ; \
- chmod 755 $$tdir/sudo-exec.postinstall $$tdir/sudo-man.postinstall $$tdir/sudo-config.postinstall ; \
- strip $$tdir/sudo ; \
- strip $$tdir/visudo ; \
- cd $$tdir ; \
- swpackage -x target_type=tape -d ../sudo-$(VERSION).depot -s sudo.psf ; \
- cd .. ; \
- gzip -f --best sudo-$(VERSION).depot; \
- rm -rf tmp.depot ; \
- )
+dist: ChangeLog
+ pax -w -x ustar -s '/^/$(PACKAGE_TARNAME)-$(VERSION)\//' \
+ -f ../$(PACKAGE_TARNAME)-$(VERSION).tar $(DISTFILES)
+ gzip -9f ../$(PACKAGE_TARNAME)-$(VERSION).tar
+ ls -l ../$(PACKAGE_TARNAME)-$(VERSION).tar.gz
+
+package: sudo.pp
+ DESTDIR=`cd $(top_builddir) && pwd`/destdir; rm -rf $$DESTDIR; \
+ $(MAKE) install DESTDIR=$$DESTDIR && \
+ $(SHELL) $(srcdir)/pp $(PPFLAGS) \
+ --destdir=$$DESTDIR \
+ $(srcdir)/sudo.pp \
+ bindir=$(bindir) \
+ sbindir=$(sbindir) \
+ libexecdir=$(libexecdir) \
+ timedir=$(timedir) \
+ mandir=$(mandir) \
+ docdir=$(docdir) \
+ sysconfdir=$(sysconfdir) \
+ sudoersdir=$(sudoersdir) \
+ sudoers_uid=$(sudoers_uid) \
+ sudoers_gid=$(sudoers_gid) \
+ sudoers_mode=$(sudoers_mode) \
+ version=$(VERSION) $(PPVARS)
+
+.PHONY: ChangeLog