From aa3783e04b150b57b20d2565525c8d00d524112e Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 1 Aug 2006 13:33:09 +0000 Subject: [PATCH] Port cups to -ng git-svn-id: svn://svn.openwrt.org/openwrt/packages@4366 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/cups/Makefile | 114 +++++++++++++++++++++++++ net/cups/files/cupsd.init | 4 + net/cups/files/etc/cups/classes.conf | 7 ++ net/cups/files/etc/cups/client.conf | 9 ++ net/cups/files/etc/cups/cupsd.conf | 50 +++++++++++ net/cups/files/etc/cups/printers.conf | 23 +++++ net/cups/patches/100-makefile-targets.patch | 11 +++ net/cups/patches/110-no-strip-on-install.patch | 12 +++ net/cups/patches/120-documentation-url.patch | 20 +++++ 9 files changed, 250 insertions(+) create mode 100644 net/cups/Makefile create mode 100644 net/cups/files/cupsd.init create mode 100644 net/cups/files/etc/cups/classes.conf create mode 100644 net/cups/files/etc/cups/client.conf create mode 100644 net/cups/files/etc/cups/cupsd.conf create mode 100644 net/cups/files/etc/cups/printers.conf create mode 100644 net/cups/patches/100-makefile-targets.patch create mode 100644 net/cups/patches/110-no-strip-on-install.patch create mode 100644 net/cups/patches/120-documentation-url.patch diff --git a/net/cups/Makefile b/net/cups/Makefile new file mode 100644 index 000000000..0dd4065cd --- /dev/null +++ b/net/cups/Makefile @@ -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 index 000000000..8e5fd63c4 --- /dev/null +++ b/net/cups/files/cupsd.init @@ -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 index 000000000..15afda75a --- /dev/null +++ b/net/cups/files/etc/cups/classes.conf @@ -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 index 000000000..c8d9f910e --- /dev/null +++ b/net/cups/files/etc/cups/client.conf @@ -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 index 000000000..e84de453b --- /dev/null +++ b/net/cups/files/etc/cups/cupsd.conf @@ -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 + + +AuthType Basic +AuthClass System +Order Allow,Deny +Allow From All + + + +AuthType Basic +AuthClass System + +Order Allow,Deny +Allow From All + + diff --git a/net/cups/files/etc/cups/printers.conf b/net/cups/files/etc/cups/printers.conf new file mode 100644 index 000000000..88bba1b13 --- /dev/null +++ b/net/cups/files/etc/cups/printers.conf @@ -0,0 +1,23 @@ + +Info USB Printer +Location +DeviceURI usb:/dev/usb/lp0 +State Idle +Accepting Yes +JobSheets none none +QuotaPeriod 0 +PageLimit 0 +KLimit 0 + + + +Info Parallel Port Printer +Location +DeviceURI parallel:/dev/printers/0 +State Idle +Accepting Yes +JobSheets none none +QuotaPeriod 0 +PageLimit 0 +KLimit 0 + diff --git a/net/cups/patches/100-makefile-targets.patch b/net/cups/patches/100-makefile-targets.patch new file mode 100644 index 000000000..590a304b1 --- /dev/null +++ b/net/cups/patches/100-makefile-targets.patch @@ -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 index 000000000..1addc7593 --- /dev/null +++ b/net/cups/patches/110-no-strip-on-install.patch @@ -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 index 000000000..07d090c2a --- /dev/null +++ b/net/cups/patches/120-documentation-url.patch @@ -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 @@ + Easy Software Products Home Page + Do Administration Tasks + Manage Printer Classes Status +- On-Line Help ++ On-Line Help + Manage Jobs + Manage Printers + Download the Current CUPS Software +@@ -20,7 +20,7 @@ + +

Do Administration Tasks

+

Manage Printer Classes

+-

On-Line Help

++

On-Line Help

+

Manage Jobs

+

Manage Printers

+

Download the Current CUPS Software

-- 2.11.0