From ba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Sat, 30 May 2009 20:39:07 +0200
Subject: optimize ipkg package management

- generate ipkg control file from PKG_* variables
- automatically install init scripts from ./files/*.init
  set #PKG pkgname to set the binary package
- rename FWINIT -> INIT
- move postinst and conffiles meta data to ./files
- update the packages to the latest upstream version
- remove some unready or unused package (strongswan,..)

more cleanups needed after allmodconfig
---
 package/tinyproxy/Makefile                 | 9 +++++----
 package/tinyproxy/files/tinyproxy.init     | 4 +++-
 package/tinyproxy/files/tinyproxy.postinst | 3 +++
 package/tinyproxy/ipkg/tinyproxy.control   | 5 -----
 package/tinyproxy/ipkg/tinyproxy.postinst  | 3 ---
 5 files changed, 11 insertions(+), 13 deletions(-)
 create mode 100644 package/tinyproxy/files/tinyproxy.postinst
 delete mode 100644 package/tinyproxy/ipkg/tinyproxy.control
 delete mode 100644 package/tinyproxy/ipkg/tinyproxy.postinst

(limited to 'package/tinyproxy')

diff --git a/package/tinyproxy/Makefile b/package/tinyproxy/Makefile
index 6b2a65db7..9d2fa7637 100644
--- a/package/tinyproxy/Makefile
+++ b/package/tinyproxy/Makefile
@@ -9,11 +9,14 @@ PKG_NAME:=		tinyproxy
 PKG_VERSION:=		1.6.4
 PKG_RELEASE:=		1
 PKG_MD5SUM:=		3157b9159a8d005f4248cf4d4d6c65e2
-MASTER_SITES:=		https://www.banu.com/pub/tinyproxy/1.6/
+PKG_DESCR:=		Tinyproxy is a lightweight HTTP and HTTPS proxy.
+PKG_SECTION:=		net
+PKG_URL:=		https://www.banu.com/tinyproxy
+PKG_SITES:=		https://www.banu.com/pub/tinyproxy/1.6/
 
 include ${TOPDIR}/mk/package.mk
 
-$(eval $(call PKG_template,TINYPROXY,tinyproxy,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,TINYPROXY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIGURE_STYLE:=	gnu
 BUILD_STYLE:=		auto
@@ -33,12 +36,10 @@ endif
 post-install:
 	${INSTALL_DIR} ${IDIR_TINYPROXY}/usr/sbin \
 		       ${IDIR_TINYPROXY}/etc/tinyproxy \
-		       ${IDIR_TINYPROXY}/etc/init.d \
 		       ${IDIR_TINYPROXY}/usr/share/tinyproxy
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/tinyproxy ${IDIR_TINYPROXY}/usr/sbin/
 	${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/{debug,default,stats}.html ${IDIR_TINYPROXY}/usr/share/tinyproxy/
 	${INSTALL_DATA} ${WRKINST}/usr/share/tinyproxy/HTML_VARIABLES ${IDIR_TINYPROXY}/usr/share/tinyproxy/
 	${INSTALL_DATA} ${WRKINST}/etc/tinyproxy/tinyproxy.conf ${IDIR_TINYPROXY}/etc/tinyproxy/
-	${INSTALL_BIN} files/${PKG_NAME}.init ${IDIR_TINYPROXY}/etc/init.d/${PKG_NAME}
 
 include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/tinyproxy/files/tinyproxy.init b/package/tinyproxy/files/tinyproxy.init
index e1b7f6f7c..8cf6fbb6a 100644
--- a/package/tinyproxy/files/tinyproxy.init
+++ b/package/tinyproxy/files/tinyproxy.init
@@ -1,5 +1,7 @@
 #!/bin/sh
-#FWINIT 70
+#PKG tinyproxy
+#INIT 70
+
 . /etc/rc.conf
 
 case $1 in
diff --git a/package/tinyproxy/files/tinyproxy.postinst b/package/tinyproxy/files/tinyproxy.postinst
new file mode 100644
index 000000000..4965f625d
--- /dev/null
+++ b/package/tinyproxy/files/tinyproxy.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf tinyproxy tinyproxy NO
diff --git a/package/tinyproxy/ipkg/tinyproxy.control b/package/tinyproxy/ipkg/tinyproxy.control
deleted file mode 100644
index 821b927e4..000000000
--- a/package/tinyproxy/ipkg/tinyproxy.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: tinyproxy
-Version: 1.6.3
-Section: net
-Description: Tinyproxy is a lightweight HTTP and HTTPS proxy.
-Priority: optional
diff --git a/package/tinyproxy/ipkg/tinyproxy.postinst b/package/tinyproxy/ipkg/tinyproxy.postinst
deleted file mode 100644
index 4965f625d..000000000
--- a/package/tinyproxy/ipkg/tinyproxy.postinst
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-. $IPKG_INSTROOT/etc/functions.sh
-add_rcconf tinyproxy tinyproxy NO
-- 
cgit v1.2.3