From e229b360839fbfa3935707ba2c84f8041cf106c0 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 30 Mar 2008 16:48:47 -0700 Subject: Moved RPM packaging dir to top-level --- Makefile.am | 16 ++++----- packaging/redhat/tinyproxy-initd | 41 ---------------------- packaging/redhat/tinyproxy.spec | 74 ---------------------------------------- rpm/tinyproxy-initd | 41 ++++++++++++++++++++++ rpm/tinyproxy.spec | 74 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 124 deletions(-) delete mode 100644 packaging/redhat/tinyproxy-initd delete mode 100644 packaging/redhat/tinyproxy.spec create mode 100644 rpm/tinyproxy-initd create mode 100644 rpm/tinyproxy.spec diff --git a/Makefile.am b/Makefile.am index 6228171..a1cdc9d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,19 @@ -# Redhat spec files (from RPMs) -REDHAT_DIR = packaging/redhat -REDHAT = \ - $(REDHAT_DIR)/tinyproxy-initd \ - $(REDHAT_DIR)/tinyproxy.spec +# RPM spec files +RPM_DIR = rpm +RPM_FILES = \ + $(RPM_DIR)/tinyproxy-initd \ + $(RPM_DIR)/tinyproxy.spec # Packaging files -PACKAGING = $(REDHAT) +PACKAGING_FILES = $(RPM_FILES) -# # The following files are required for the build process -# CONFIG_FILES = \ config/config.guess config/config.sub \ config/ltmain.sh config/install-sh config/missing config/mkinstalldirs \ config/typecheck.m4 config/argenable.m4 -EXTRA_DIST = $(CONFIG_FILES) TODO $(PACKAGING) bootstrap +EXTRA_DIST = $(CONFIG_FILES) TODO $(PACKAGING_FILES) bootstrap SUBDIRS = src doc install-data-local: tinyproxy-configure-file tinyproxy-html-files diff --git a/packaging/redhat/tinyproxy-initd b/packaging/redhat/tinyproxy-initd deleted file mode 100644 index a1896bd..0000000 --- a/packaging/redhat/tinyproxy-initd +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# initfile for tinyproxy -# -# description: A small, efficient HTTP/SSL proxy daemon. -# -# processname: tinyproxy -# -# chkconfig 2345 -# - -. /etc/rc.d/init.d/functions - -case "$1" in - start) - echo -n "Starting tinyproxy: " - daemon /usr/sbin/tinyproxy - touch /var/lock/subsys/tinyproxy - echo - ;; - stop) - echo -n "Shutting down tinyproxy: " - killproc tinyproxy - rm -f /var/lock/subsys/tinyproxy - echo - ;; - restart) - $0 stop - $0 start - ;; - status) - status tinyproxy - ;; - *) - echo "Usage: tinyproxy {start|stop|restart|status}" - exit 1 -esac - -exit 0 - - diff --git a/packaging/redhat/tinyproxy.spec b/packaging/redhat/tinyproxy.spec deleted file mode 100644 index 7ef87fc..0000000 --- a/packaging/redhat/tinyproxy.spec +++ /dev/null @@ -1,74 +0,0 @@ -Summary: A small, efficient HTTP/SSL proxy daemon. -Name: tinyproxy -Version: 1.5.2 -Release: 1 -License: GPL -Group: System Environment/Daemons -URL: http://tinyproxy.sourceforge.net -Prefix: %{_prefix} -Packager: S. A. Hutchins -Source: tinyproxy-1.5.2.tar.gz -Source1: tinyproxy-initd -BuildRoot: %{_tmppath}/%{name}-%{version}-root - -%description -tinyproxy is a small, efficient HTTP/SSL proxy daemon released under the GNU -General Public License (GPL). tinyproxy is very useful in a small network -setting, where a larger proxy like Squid would either be too resource -intensive, or a security risk. - -%prep -%setup - -%build - ./configure --enable-transparent-proxy --prefix=%{_prefix} \ - --mandir=%{_mandir} - make - -%install - if [ "$RPM_BUILD_ROOT" != "/" ]; then - rm -rf $RPM_BUILD_ROOT - fi - - pwd - - cd $RPM_BUILD_DIR/%{name}-%{version} - make install prefix=%{_prefix} DESTDIR="$RPM_BUILD_ROOT" - - mkdir -p $RPM_BUILD_ROOT/etc/init.d - cp -f $RPM_SOURCE_DIR/tinyproxy-initd $RPM_BUILD_ROOT/etc/init.d/tinyproxy - -%files -%defattr(-, root, root) - %{_sbindir}/tinyproxy - %{_mandir}/* - -%defattr(0755, root, root) - /etc/init.d/tinyproxy - -%defattr(0600, root, root) - /etc/tinyproxy/tinyproxy.conf - /etc/tinyproxy/tinyproxy.conf-dist - -%doc AUTHORS COPYING INSTALL NEWS README TODO -%doc ChangeLog -%doc doc/filter-howto.txt -%doc doc/HTTP_ERROR_CODES -%doc doc/releases.txt -%doc doc/RFC_INFO -%doc doc/report.sh - -%clean - if [ "$RPM_BUILD_DIR" != "/" ]; then - rm -rf $RPM_BUILD_DIR/%{name}-%{version} - fi - if [ "$RPM_BUILD_ROOT" != "/" ]; then - rm -rf $RPM_BUILD_ROOT - fi - -%changelog -* Sat Feb 01 2003 S. A. Hutchins -- From the depths of the void this beast I spawn. I added an initrd script for - this so it can be started/stopped from /sbin/service. My version of RedHat - doesn't have a 'nogroup' so used nobody instead. - diff --git a/rpm/tinyproxy-initd b/rpm/tinyproxy-initd new file mode 100644 index 0000000..a1896bd --- /dev/null +++ b/rpm/tinyproxy-initd @@ -0,0 +1,41 @@ +#!/bin/bash + +# initfile for tinyproxy +# +# description: A small, efficient HTTP/SSL proxy daemon. +# +# processname: tinyproxy +# +# chkconfig 2345 +# + +. /etc/rc.d/init.d/functions + +case "$1" in + start) + echo -n "Starting tinyproxy: " + daemon /usr/sbin/tinyproxy + touch /var/lock/subsys/tinyproxy + echo + ;; + stop) + echo -n "Shutting down tinyproxy: " + killproc tinyproxy + rm -f /var/lock/subsys/tinyproxy + echo + ;; + restart) + $0 stop + $0 start + ;; + status) + status tinyproxy + ;; + *) + echo "Usage: tinyproxy {start|stop|restart|status}" + exit 1 +esac + +exit 0 + + diff --git a/rpm/tinyproxy.spec b/rpm/tinyproxy.spec new file mode 100644 index 0000000..7ef87fc --- /dev/null +++ b/rpm/tinyproxy.spec @@ -0,0 +1,74 @@ +Summary: A small, efficient HTTP/SSL proxy daemon. +Name: tinyproxy +Version: 1.5.2 +Release: 1 +License: GPL +Group: System Environment/Daemons +URL: http://tinyproxy.sourceforge.net +Prefix: %{_prefix} +Packager: S. A. Hutchins +Source: tinyproxy-1.5.2.tar.gz +Source1: tinyproxy-initd +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +tinyproxy is a small, efficient HTTP/SSL proxy daemon released under the GNU +General Public License (GPL). tinyproxy is very useful in a small network +setting, where a larger proxy like Squid would either be too resource +intensive, or a security risk. + +%prep +%setup + +%build + ./configure --enable-transparent-proxy --prefix=%{_prefix} \ + --mandir=%{_mandir} + make + +%install + if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT + fi + + pwd + + cd $RPM_BUILD_DIR/%{name}-%{version} + make install prefix=%{_prefix} DESTDIR="$RPM_BUILD_ROOT" + + mkdir -p $RPM_BUILD_ROOT/etc/init.d + cp -f $RPM_SOURCE_DIR/tinyproxy-initd $RPM_BUILD_ROOT/etc/init.d/tinyproxy + +%files +%defattr(-, root, root) + %{_sbindir}/tinyproxy + %{_mandir}/* + +%defattr(0755, root, root) + /etc/init.d/tinyproxy + +%defattr(0600, root, root) + /etc/tinyproxy/tinyproxy.conf + /etc/tinyproxy/tinyproxy.conf-dist + +%doc AUTHORS COPYING INSTALL NEWS README TODO +%doc ChangeLog +%doc doc/filter-howto.txt +%doc doc/HTTP_ERROR_CODES +%doc doc/releases.txt +%doc doc/RFC_INFO +%doc doc/report.sh + +%clean + if [ "$RPM_BUILD_DIR" != "/" ]; then + rm -rf $RPM_BUILD_DIR/%{name}-%{version} + fi + if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT + fi + +%changelog +* Sat Feb 01 2003 S. A. Hutchins +- From the depths of the void this beast I spawn. I added an initrd script for + this so it can be started/stopped from /sbin/service. My version of RedHat + doesn't have a 'nogroup' so used nobody instead. + -- cgit v1.2.3