-#############################################################################
-# RPM specifice stuff (SuSE or Redhat, ..)
-#############################################################################
-rpm-stuff: dist-check clean clobber
- for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
- if [ ! -w $(RPM_BASE)/$$dir ]; then \
- $(ECHO) "$(RPM_BASE)/$$dir is not writable for you. Maybe try as root."; \
- $(ECHO) "Or add a suitable path to .rpmmacros like."; \
- $(ECHO) "%_topdir /home/foo/rpm-build"; \
- exit 1; \
- fi; \
- done; \
-
-check-release:
- @if [ "$(RPM_PACKAGEV)" = "" ]; then \
- echo ; \
- echo " ERROR: NO RPM_PACKAGEV VALUE"; \
- echo " No value given for RPM_PACKAGEV. Please use:"; \
- echo " make dist-upload RPM_PACKAGEV=release"; \
- echo " where \"release\" is the release number you want to and"; \
- echo " where \"dist\" is the name of the distro (redhat or suse)"; \
- echo ; \
- echo " Ex: make redhat-upload RPM_PACKAGEV=1"; \
- echo ""; \
- echo "ATTENTION: If your distribution use a specific tag on the"; \
- echo " release field (like \"cl\" for Conectiva, and"; \
- echo " \"mdk\" for Mandrake), DO NOT put it on the value"; \
- echo " given to RPM_PACKAGEV. It will be added automaticaly."; \
- echo " Do it like you would do for a redhat package,"; \
- echo " (i.e. just the number)."; \
- echo ; \
- exit 1; \
- fi
-
-
-#############################################################################
-# Create Conectiva specfile from RedHat specfile
-#############################################################################
-conectiva-spec:
- $(RM) privoxy-cl.spec
- chmod a+x genclspec.sh
- ./genclspec.sh
-
-#############################################################################
-# Conectiva distribution for x86
-#############################################################################
-conectiva-dist: rpm-stuff conectiva-spec
-
- $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
- $(RPMBUILD) --clean -ta $(TAR_ARCH)
- if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
-
-conectiva-upload: check-release
- make redhat-upload RPM_PACKAGEV=$(RPM_PACKAGEV)cl
-
-#############################################################################
-# redhat distribution alpha and x86
-#############################################################################
-redhat-dist: rpm-stuff
- echo $(CONFIG_FILES)
- $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
- $(RPMBUILD) --clean -ta $(TAR_ARCH)
- if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
-
-# For testing build issues only! Use redhat-dist for official releases.
-redhat-test:
- echo $(CONFIG_FILES)
- $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
- $(RPMBUILD) --clean -tb $(TAR_ARCH)
- if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
- @echo "WARNING: This target is only for testing. Use redhat-dist for releases!!!"
-
-# anonymously ncftps the rpms to sourceforge
-redhat-upload: check-release
- ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
-# better should use `arch` here instead of ix86 to support other platforms too
- ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
- @$(ECHO) -------------------------------------------------------
- @$(ECHO) Now goto
- @$(ECHO) https://sourceforge.net/project/admin/editpackages.php?group_id=11118
- @$(ECHO) ... and release the files.
- @$(ECHO) -------------------------------------------------------
- # w3m http://sourceforge.net/project/admin/editpackages.php?group_id=11118
-
-
-#############################################################################
-# Creates a Red Hat sourcepackage from CVS (not from the current sources
-# on disk)
-#############################################################################
-redhat-srpm:
- make create-archive
- $(RPMBUILD) -ts --nodeps $(PROGRAM)-$(VERSION).tar.gz
-
-
-#############################################################################
-# suse distribution. works fine. no need to be root.
-#############################################################################
-suse-dist: rpm-stuff
-# TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
-# if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
-# -e 's/^\(Release:\).*/\1 $(RPM_PACKAGEV)/g' \
-# privoxy-suse.spec > $$TMPFILE ; then \
-# $(MV) -f $$TMPFILE privoxy-suse.spec; \
-# else \
-# $(ECHO) "Could not set version info in specfile."; \
-# exit 1;\
-# fi
-
- $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
- $(RPMBUILD) --clean -ta $(TAR_ARCH)
- if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
-
-# anonymously ncftps the rpms to sourceforge
-suse-upload: check-release
- ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
-# better should use `arch` here instead of ix86 to support other platforms too
- ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
- @$(ECHO) -------------------------------------------------------
- @$(ECHO) Now goto
- @$(ECHO) https://sourceforge.net/project/admin/editpackages.php?group_id=11118
- @$(ECHO) ... and release the files.
- @$(ECHO) -------------------------------------------------------
-
-# handle with care. use with root.
-suse-clean:
- $(RPM) -e junkbuster-suse || true
- $(RM) -r /etc/junkbuster
- $(RM) -r /etc/rc.d/junkbuster*
- $(RM) -r /var/run/junkbuster.pid
- $(RM) -r /var/log/junkbuster
- $(RM) /etc/init.d/junkbuster
- $(RM) /usr/sbin/junkbuster
- $(RM) /usr/sbin/rcjunkbuster
- $(RM) /usr/share/man/man1/junkbuster.1.gz
- $(RPM) -e privoxy-suse || true
- $(RM) -r /etc/privoxy
- $(RM) -r /etc/rc.d/privoxy*
- $(RM) -r /var/run/privoxy.pid
- $(RM) -r /var/log/privoxy
- $(RM) /etc/init.d/privoxy
- $(RM) /usr/sbin/privoxy
- $(RM) /usr/sbin/rcprivoxy
- $(RM) /usr/share/man/man1/privoxy.1.gz
-