Port cups to -ng

git-svn-id: svn://svn.openwrt.org/openwrt/packages@4366 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2006-08-01 13:33:09 +00:00
parent 198fd40f05
commit aa3783e04b
9 changed files with 250 additions and 0 deletions

114
net/cups/Makefile Normal file
View File

@ -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))

View File

@ -0,0 +1,4 @@
#!/bin/sh
mkdir -p /tmp/cups
mkdir -p /tmp/spool/cups/tmp
exec /usr/sbin/cupsd

View File

@ -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. #
# #
########################################################################

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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
#

View File

@ -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

View File

@ -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>