Port cups to -ng
authorFlorian Fainelli <florian@openwrt.org>
Tue, 1 Aug 2006 13:33:09 +0000 (13:33 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 1 Aug 2006 13:33:09 +0000 (13:33 +0000)
SVN-Revision: 4366

net/cups/Makefile [new file with mode: 0644]
net/cups/files/cupsd.init [new file with mode: 0644]
net/cups/files/etc/cups/classes.conf [new file with mode: 0644]
net/cups/files/etc/cups/client.conf [new file with mode: 0644]
net/cups/files/etc/cups/cupsd.conf [new file with mode: 0644]
net/cups/files/etc/cups/printers.conf [new file with mode: 0644]
net/cups/patches/100-makefile-targets.patch [new file with mode: 0644]
net/cups/patches/110-no-strip-on-install.patch [new file with mode: 0644]
net/cups/patches/120-documentation-url.patch [new file with mode: 0644]

diff --git a/net/cups/Makefile b/net/cups/Makefile
new file mode 100644 (file)
index 0000000..0dd4065
--- /dev/null
@@ -0,0 +1,114 @@
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cups
+PKG_VERSION:=1.1.23
+PKG_RELEASE:=1
+PKG_MD5SUM:=4ce09b1dce09b6b9398af0daae9adf63
+
+PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/ftp.easysw.com/pub/cups/$(PKG_VERSION) \
+       http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
+       ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
+PKG_CAT:=bzcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+PKG_BUILDDEP:=zlib
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cups
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+zlib
+  TITLE:=Common UNIX Printing System
+  DESCRIPTION:=A printer spooling system for devices with USB or LP support
+  URL:=http://www.cups.org/
+endef
+
+define Package/cups/conffiles
+/etc/cups/classes.conf
+/etc/cups/client.conf
+/etc/cups/cupsd.conf
+/etc/cups/printers.conf
+endef
+
+define Build/Configure
+$(call Build/Configure/Default, --with-gnu-ld \
+--with-cups-user=root \
+--with-cups-group=root \
+--without-perl \
+--without-python \
+--without-php \
+--disable-slp \
+--disable-gnutls \
+--disable-openssl \
+--disable-cdsassl \
+--disable-ssl \
+--disable-slp \
+)
+endef
+
+define Build/Compile
+       rm -rf $(PKG_INSTALL_DIR)
+       mkdir -p $(PKG_INSTALL_DIR)
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DSTROOT="$(PKG_INSTALL_DIR)" \
+               STRIP="/bin/true" \
+               all install
+endef
+
+define Package/cups/install
+       rm -rf $(1)/etc/cups
+       install -d -m0755 $(1)/etc/cups
+       $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
+       rm -rf $(1)/etc/cups/certs
+       ln -sf /tmp $(1)/etc/cups/certs
+       install -d -m0755 $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       rm -f $(1)/usr/bin/cups-config
+       install -d -m0755 $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(1)/usr/lib/
+       install -d -m0755 $(1)/usr/share/cups/templates
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(1)/usr/share/cups/templates/
+       install -d -m0755 $(1)/usr/share/doc/cups
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(1)/usr/share/doc/cups/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(1)/usr/share/doc/cups/
+       install -d -m0755 $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+       # overwrite default config with our own
+       $(CP) ./files/etc/cups/* $(1)/etc/cups/
+       # install initscript with priority 60
+       install -d -m0755 $(1)/etc/init.d
+       install -m0755 ./files/cupsd.init $(1)/etc/init.d/S60cupsd
+       find $(1) -name CVS | xargs rm -rf
+       $(RSTRIP) $(1)
+       $(IPKG_BUILD) $(1) $(PACKAGE_DIR)
+endef
+
+define Build/InstallDev
+       mkdir -p $(STAGING_DIR)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/
+       mkdir -p $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/
+       mkdir -p $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/
+endef
+
+define Build/UninstallDev
+       rm -rf \
+         $(STAGING_DIR)/usr/bin/cups-config \
+         $(STAGING_DIR)/usr/include/cups \
+         $(STAGING_DIR)/usr/lib/libcups.{a,so*}
+endef
+
+$(eval $(call BuildPackage,cups))
diff --git a/net/cups/files/cupsd.init b/net/cups/files/cupsd.init
new file mode 100644 (file)
index 0000000..8e5fd63
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /tmp/cups
+mkdir -p /tmp/spool/cups/tmp
+exec /usr/sbin/cupsd
diff --git a/net/cups/files/etc/cups/classes.conf b/net/cups/files/etc/cups/classes.conf
new file mode 100644 (file)
index 0000000..15afda7
--- /dev/null
@@ -0,0 +1,7 @@
+########################################################################
+#                                                                      #
+# This is a sample class configuration file.  This file is included    #
+# from the main configuration file (cups.conf) and lists all of the    #
+# printer classes known to the system.                                 #
+#                                                                      #
+########################################################################
diff --git a/net/cups/files/etc/cups/client.conf b/net/cups/files/etc/cups/client.conf
new file mode 100644 (file)
index 0000000..c8d9f91
--- /dev/null
@@ -0,0 +1,9 @@
+########################################################################
+#                                                                      #
+# This is the CUPS client configuration file.  This file is used to    #
+# define client-specific parameters, such as the default server or     #
+# default encryption settings.                                         #
+#                                                                      #
+########################################################################
+
+Encryption Never
diff --git a/net/cups/files/etc/cups/cupsd.conf b/net/cups/files/etc/cups/cupsd.conf
new file mode 100644 (file)
index 0000000..e84de45
--- /dev/null
@@ -0,0 +1,50 @@
+########################################################################
+#                                                                      #
+# This is the CUPS configuration file.  If you are familiar with       #
+# Apache or any of the other popular web servers, we've followed the   #
+# same format.  Any configuration variable used here has the same      #
+# semantics as the corresponding variable in Apache.  If we need       #
+# different functionality then a different name is used to avoid       #
+# confusion...                                                         #
+#                                                                      #
+########################################################################
+
+
+AccessLog syslog
+ErrorLog syslog
+LogLevel info
+PageLog syslog
+PreserveJobHistory No
+PreserveJobFiles No
+AutoPurgeJobs Yes
+MaxJobs 25
+MaxPrinterHistory 10
+#Printcap /etc/printcap
+#PrintcapFormat BSD
+RequestRoot /tmp/cups
+#RemoteRoot remroot
+User root
+Group root
+RIPCache 512k
+TempDir /tmp/cups
+Port 631
+HostNameLookups Off
+KeepAlive On
+Browsing On
+BrowseProtocols cups
+
+<Location />
+AuthType Basic
+AuthClass System
+Order Allow,Deny
+Allow From All
+</Location>
+
+<Location /admin>
+AuthType Basic
+AuthClass System
+
+Order Allow,Deny
+Allow From All
+</Location>
+
diff --git a/net/cups/files/etc/cups/printers.conf b/net/cups/files/etc/cups/printers.conf
new file mode 100644 (file)
index 0000000..88bba1b
--- /dev/null
@@ -0,0 +1,23 @@
+<DefaultPrinter USB>
+Info USB Printer
+Location
+DeviceURI usb:/dev/usb/lp0
+State Idle
+Accepting Yes
+JobSheets none none
+QuotaPeriod 0
+PageLimit 0
+KLimit 0
+</Printer>
+
+<Printer LP>
+Info Parallel Port Printer
+Location
+DeviceURI parallel:/dev/printers/0
+State Idle
+Accepting Yes
+JobSheets none none
+QuotaPeriod 0
+PageLimit 0
+KLimit 0
+</Printer>
diff --git a/net/cups/patches/100-makefile-targets.patch b/net/cups/patches/100-makefile-targets.patch
new file mode 100644 (file)
index 0000000..590a304
--- /dev/null
@@ -0,0 +1,11 @@
+--- cups-1.1.23.old/Makefile   2005-01-03 20:29:44.000000000 +0100
++++ cups-1.1.23/Makefile       2005-03-23 20:15:24.000000000 +0100
+@@ -28,7 +28,7 @@
+ # Directories to make...
+ #
+-DIRS  =       cups backend berkeley cgi-bin filter man pdftops \
++DIRS  =       cups backend berkeley cgi-bin \
+               scheduler systemv
+ #
diff --git a/net/cups/patches/110-no-strip-on-install.patch b/net/cups/patches/110-no-strip-on-install.patch
new file mode 100644 (file)
index 0000000..1addc75
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN cups-1.1.23.old/Makedefs.in cups-1.1.23/Makedefs.in
+--- cups-1.1.23.old/Makedefs.in        2005-01-03 20:29:44.000000000 +0100
++++ cups-1.1.23/Makedefs.in    2005-03-23 20:28:06.000000000 +0100
+@@ -47,7 +47,7 @@
+ # Installation programs...
+ #
+-INSTALL_BIN   =       $(LIBTOOL) $(INSTALL) -m 755 -s
++INSTALL_BIN   =       $(LIBTOOL) $(INSTALL) -m 755
+ INSTALL_DATA  =       $(INSTALL) -m 644
+ INSTALL_DIR   =       $(INSTALL) -d
+ INSTALL_LIB   =       $(LIBTOOL) $(INSTALL) -m 755
diff --git a/net/cups/patches/120-documentation-url.patch b/net/cups/patches/120-documentation-url.patch
new file mode 100644 (file)
index 0000000..07d090c
--- /dev/null
@@ -0,0 +1,20 @@
+--- cups-1.1.23/doc/index.html.orig    2005-01-03 21:13:59.000000000 +0100
++++ cups-1.1.23/doc/index.html 2005-03-23 22:18:15.000000000 +0100
+@@ -6,7 +6,7 @@
+               <AREA SHAPE="RECT" COORDS="12,10,50,20" HREF="http://www.easysw.com" ALT="Easy Software Products Home Page">
+               <AREA SHAPE="RECT" COORDS="82,10,196,20" HREF="/admin" ALT="Do Administration Tasks">
+               <AREA SHAPE="RECT" COORDS="216,10,280,20" HREF="/classes" ALT="Manage Printer Classes Status">
+-              <AREA SHAPE="RECT" COORDS="300,10,336,20" HREF="/documentation.html" ALT="On-Line Help">
++              <AREA SHAPE="RECT" COORDS="300,10,336,20" HREF="http://www.cups.org/documentation.php" ALT="On-Line Help">
+               <AREA SHAPE="RECT" COORDS="356,10,394,20" HREF="/jobs" ALT="Manage Jobs">
+               <AREA SHAPE="RECT" COORDS="414,10,476,20" HREF="/printers" ALT="Manage Printers">
+               <AREA SHAPE="RECT" COORDS="496,10,568,20" HREF="http://www.cups.org" ALT="Download the Current CUPS Software">
+@@ -20,7 +20,7 @@
+ <H1><A HREF="admin">Do Administration Tasks</A></H1>
+ <H1><A HREF="classes">Manage Printer Classes</A></H1>
+-<H1><A HREF="documentation.html">On-Line Help</A></H1>
++<H1><A HREF="http://www.cups.org/documentation.php">On-Line Help</A></H1>
+ <H1><A HREF="jobs">Manage Jobs</A></H1>
+ <H1><A HREF="printers">Manage Printers</A></H1>
+ <H1><A HREF="http://www.cups.org">Download the Current CUPS Software</A></H1>