2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.bz2
15 PKG_SOURCE_URL:= http://www.cups.org/software/$(PKG_VERSION)
16 PKG_MD5SUM:=de3006e5cf1ee78a9c6145ce62c4e982
18 TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
20 include $(INCLUDE_DIR)/package.mk
22 define Package/cups/Default
23 URL:=http://www.cups.org/
28 $(call Package/cups/Default)
31 DEPENDS:=+libcups +libcupsmime +libcupscgi +libcupsppdc +libusb-1.0
32 TITLE:=Common UNIX Printing System (daemon)
35 define Package/cups/description
36 Common UNIX Printing System (daemon)
39 define Package/cups/conffiles
40 /etc/cups/classes.conf
42 /etc/cups/printers.conf
45 define Package/cups-bsd
46 $(call Package/cups/Default)
50 TITLE:=Common UNIX Printing System - BSD commands (old)
53 define Package/cups-bsd/description
54 Common UNIX Printing System - BSD commands (old)
57 define Package/cups-client
58 $(call Package/cups/Default)
61 DEPENDS:=+libcups +libcupsimage +libcupsmime
62 TITLE:=Common UNIX Printing System - Client commands
65 define Package/cups-client/conffiles
69 define Package/cups-client/description
70 Common UNIX Printing System - Client commands
73 define Package/cups-filters
74 $(call Package/cups/Default)
77 DEPENDS:=+libcupsimage +libcupsdriver
78 TITLE:=Common UNIX Printing System - Filter
81 define Package/cups-filters/description
82 Common UNIX Printing System - Filter
85 define Package/cups-ppdc
86 $(call Package/cups/Default)
90 TITLE:=Common UNIX Printing System - PPDC utils
93 define Package/cups-ppdc/description
94 Common UNIX Printing System - PPDC utils
97 define Package/libcups
98 $(call Package/cups/Default)
101 DEPENDS:=+zlib +libpthread +libpng +libjpeg
102 TITLE:=Common UNIX Printing System - Core library
105 define Package/libcups/description
106 Common UNIX Printing System - Core library
109 define Package/libcupscgi
110 $(call Package/cups/Default)
114 TITLE:=Common UNIX Printing System - CGI library
117 define Package/libcupscgi/description
118 Common UNIX Printing System - CGI library
121 define Package/libcupsdriver
122 $(call Package/cups/Default)
126 TITLE:=Common UNIX Printing System - Driver library
129 define Package/libcupsdriver/description
130 Common UNIX Printing System - Driver library
133 define Package/libcupsimage
134 $(call Package/cups/Default)
137 DEPENDS:=+libcups +libpng +libjpeg
138 TITLE:=Common UNIX Printing System - Image library
141 define Package/libcupsimage/description
142 Common UNIX Printing System - Image library
145 define Package/libcupsmime
146 $(call Package/cups/Default)
150 TITLE:=Common UNIX Printing System - MIME library
153 define Package/libcupsmime/description
154 Common UNIX Printing System - MIME library
157 define Package/libcupsppdc
158 $(call Package/cups/Default)
161 DEPENDS:=+libcups +libstdcpp
162 TITLE:=Common UNIX Printing System - PPDC library
165 define Package/libcupsppdc/description
166 Common UNIX Printing System - PPDC library
169 define Package/cups-locale-de
170 $(call Package/cups/Default)
173 TITLE:=Common UNIX Printing System - Locale de
176 define Package/cups-locale-de/description
177 Common UNIX Printing System - Locale de
180 define Package/cups-locale-nl
181 $(call Package/cups/Default)
184 TITLE:=Common UNIX Printing System - Locale nl
187 define Package/cups-locale-nl/description
188 Common UNIX Printing System - Locale nl
191 define Package/cups-locale-hu
192 $(call Package/cups/Default)
195 TITLE:=Common UNIX Printing System - Locale hu
198 define Package/cups-locale-hu/description
199 Common UNIX Printing System - Locale hu
202 define Package/cups-locale-pt
203 $(call Package/cups/Default)
206 TITLE:=Common UNIX Printing System - Locale pt
209 define Package/cups-locale-pt/description
210 Common UNIX Printing System - Locale pt
213 define Package/cups-locale-pt_BR
214 $(call Package/cups/Default)
217 TITLE:=Common UNIX Printing System - Locale pt_BR
220 define Package/cups-locale-pt_BR/description
221 Common UNIX Printing System - Locale pt_BR
224 define Package/cups-locale-fi
225 $(call Package/cups/Default)
228 TITLE:=Common UNIX Printing System - Locale fi
231 define Package/cups-locale-fi/description
232 Common UNIX Printing System - Locale fi
235 define Package/cups-locale-sv
236 $(call Package/cups/Default)
239 TITLE:=Common UNIX Printing System - Locale sv
242 define Package/cups-locale-sv/description
243 Common UNIX Printing System - Locale sv
246 define Package/cups-locale-da
247 $(call Package/cups/Default)
250 TITLE:=Common UNIX Printing System - Locale da
253 define Package/cups-locale-da/description
254 Common UNIX Printing System - Locale da
257 define Package/cups-locale-ko
258 $(call Package/cups/Default)
261 TITLE:=Common UNIX Printing System - Locale ko
264 define Package/cups-locale-ko/description
265 Common UNIX Printing System - Locale ko
268 define Package/cups-locale-zh
269 $(call Package/cups/Default)
272 TITLE:=Common UNIX Printing System - Locale zh
275 define Package/cups-locale-zh/description
276 Common UNIX Printing System - Locale zh
279 define Package/cups-locale-ja
280 $(call Package/cups/Default)
283 TITLE:=Common UNIX Printing System - Locale ja
286 define Package/cups-locale-ja/description
287 Common UNIX Printing System - Locale ja
290 define Package/cups-locale-es
291 $(call Package/cups/Default)
294 TITLE:=Common UNIX Printing System - Locale es
297 define Package/cups-locale-es/description
298 Common UNIX Printing System - Locale es
301 define Package/cups-locale-zh_TW
302 $(call Package/cups/Default)
305 TITLE:=Common UNIX Printing System - Locale zh_TW
308 define Package/cups-locale-zh_TW/description
309 Common UNIX Printing System - Locale zh_TW
312 define Package/cups-locale-pl
313 $(call Package/cups/Default)
316 TITLE:=Common UNIX Printing System - Locale pl
319 define Package/cups-locale-pl/description
320 Common UNIX Printing System - Locale pl
323 define Package/cups-locale-no
324 $(call Package/cups/Default)
327 TITLE:=Common UNIX Printing System - Locale no
330 define Package/cups-locale-no/description
331 Common UNIX Printing System - Locale no
334 define Package/cups-locale-ru
335 $(call Package/cups/Default)
338 TITLE:=Common UNIX Printing System - Locale ru
341 define Package/cups-locale-ru/description
342 Common UNIX Printing System - Locale ru
345 define Package/cups-locale-eu
346 $(call Package/cups/Default)
349 TITLE:=Common UNIX Printing System - Locale eu
352 define Package/cups-locale-eu/description
353 Common UNIX Printing System - Locale eu
356 define Package/cups-locale-fr
357 $(call Package/cups/Default)
360 TITLE:=Common UNIX Printing System - Locale fr
363 define Package/cups-locale-fr/description
364 Common UNIX Printing System - Locale fr
367 define Package/cups-locale-it
368 $(call Package/cups/Default)
371 TITLE:=Common UNIX Printing System - Locale it
374 define Package/cups-locale-it/description
375 Common UNIX Printing System - Locale it
378 define Package/cups-locale-id
379 $(call Package/cups/Default)
382 TITLE:=Common UNIX Printing System - Locale id
385 define Package/cups-locale-id/description
386 Common UNIX Printing System - Locale id
389 define Build/Configure
390 $(call Build/Configure/Default, \
391 --with-cups-user="nobody" \
392 --with-cups-group="nogroup" \
393 --with-components="embedded" \
394 --with-pdftops="none" \
414 LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \
419 $(MAKE) -C $(PKG_BUILD_DIR) \
420 $(TARGET_CONFIGURE_OPTS) \
421 DSTROOT="$(PKG_INSTALL_DIR)" \
426 define Package/cups/install
428 $(INSTALL_DIR) $(1)/etc/cups
429 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
430 rm -rf $(1)/etc/cups/certs
431 ln -sf /tmp $(1)/etc/cups/certs
432 rm -f $(1)/usr/bin/cups-config
433 $(INSTALL_DIR) $(1)/usr/lib/cups
434 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/backend $(1)/usr/lib/cups
435 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/cgi-bin $(1)/usr/lib/cups
436 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/daemon $(1)/usr/lib/cups
437 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/driver $(1)/usr/lib/cups
438 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/monitor $(1)/usr/lib/cups
439 $(INSTALL_DIR) $(1)/usr/lib/cups/filter
440 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/filter/{commandtops,pstops} \
441 $(PKG_INSTALL_DIR)/usr/lib/cups/filter/gziptoany \
442 $(1)/usr/lib/cups/filter
443 $(INSTALL_DIR) $(1)/usr/share/cups/templates
444 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl \
445 $(1)/usr/share/cups/templates/
446 $(INSTALL_DIR) $(1)/usr/share/cups/mime
447 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/mime/* $(1)/usr/share/cups/mime/
448 $(INSTALL_DIR) $(1)/usr/share/doc/cups
449 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html \
450 $(1)/usr/share/doc/cups/
451 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/*.css \
452 $(1)/usr/share/doc/cups/
453 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images \
454 $(1)/usr/share/doc/cups/
455 $(INSTALL_DIR) $(1)/usr/sbin
456 # overwrite default config with our own
457 $(CP) ./files/etc/cups/* $(1)/etc/cups/
458 # install initscript with priority 60
459 $(INSTALL_DIR) $(1)/etc/init.d
460 $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
462 $(PKG_INSTALL_DIR)/usr/sbin/{cupsctl,cupsd} \
466 define Package/cups-bsd/install
467 $(INSTALL_DIR) $(1)/usr/bin
468 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{lprm,lpq,lpr} $(1)/usr/bin/
469 $(INSTALL_DIR) $(1)/usr/sbin
470 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lpc $(1)/usr/sbin/
473 define Package/cups-client/install
474 $(INSTALL_DIR) $(1)/usr/bin
476 $(PKG_INSTALL_DIR)/usr/bin/{lp,cancel,cupstestppd,cupstestdsc} \
477 $(PKG_INSTALL_DIR)/usr/bin/{ipptool,lpoptions,lpstat,lppasswd} \
479 $(INSTALL_DIR) $(1)/usr/sbin
481 $(PKG_INSTALL_DIR)/usr/sbin/{cupsaccept,cupsaddsmb,cupsfilter} \
482 $(PKG_INSTALL_DIR)/usr/sbin/{lpadmin,lpinfo,lpmove} \
484 (cd $(1)/usr/sbin; ln -sf cupsaccept accept; ln -sf cupsaccept cupsenable; ln -sf cupsaccept cupsdisable; ln -sf cupsaccept reject; ln -sf cupsaccept cupsreject;)
487 define Package/cups-filters/install
488 $(INSTALL_DIR) $(1)/usr/lib/cups/filter
489 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/filter/{bannertops,commandtoescpx,commandtopclx,imagetops,imagetoraster,rastertoepson,rastertopwg,rastertohp,rastertoescpx,rastertopclx,rastertolabel,texttops} \
490 $(1)/usr/lib/cups/filter
491 (cd $(1)/usr/lib/cups/filter; ln -sf rastertolabel rastertodymo;)
494 define Package/cups-ppdc/install
495 $(INSTALL_DIR) $(1)/usr/bin
497 $(PKG_INSTALL_DIR)/usr/bin/{ppdc,ppdhtml,ppdi,ppdmerge,ppdpo} \
501 define Package/libcups/install
502 $(INSTALL_DIR) $(1)/usr/lib
503 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so* $(1)/usr/lib/
506 define Package/libcupscgi/install
507 $(INSTALL_DIR) $(1)/usr/lib
508 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupscgi.so* $(1)/usr/lib/
511 define Package/libcupsdriver/install
512 $(INSTALL_DIR) $(1)/usr/lib
513 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsdriver.so* $(1)/usr/lib/
516 define Package/libcupsimage/install
517 $(INSTALL_DIR) $(1)/usr/lib
518 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsimage.so* $(1)/usr/lib/
521 define Package/libcupsmime/install
522 $(INSTALL_DIR) $(1)/usr/lib
523 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsmime.so* $(1)/usr/lib/
526 define Package/libcupsppdc/install
527 $(INSTALL_DIR) $(1)/usr/lib
528 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsppdc.so* $(1)/usr/lib/
531 define Package/cups-locale-de/install
532 $(INSTALL_DIR) $(1)/usr/share/locale
533 $(INSTALL_DIR) $(1)/usr/share/cups/templates
534 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/de $(1)/usr/share/locale/
535 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/de \
536 $(1)/usr/share/cups/templates/
539 define Package/cups-locale-nl/install
540 $(INSTALL_DIR) $(1)/usr/share/locale
541 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/nl $(1)/usr/share/locale/
544 define Package/cups-locale-hu/install
545 $(INSTALL_DIR) $(1)/usr/share/locale
546 $(INSTALL_DIR) $(1)/usr/share/cups/templates
547 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/hu $(1)/usr/share/locale/
548 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/hu \
549 $(1)/usr/share/cups/templates/
552 define Package/cups-locale-pt/install
553 $(INSTALL_DIR) $(1)/usr/share/locale
554 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pt $(1)/usr/share/locale/
557 define Package/cups-locale-pt_BR/install
558 $(INSTALL_DIR) $(1)/usr/share/locale
559 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pt_BR $(1)/usr/share/locale/
562 define Package/cups-locale-fi/install
563 $(INSTALL_DIR) $(1)/usr/share/locale
564 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/fi $(1)/usr/share/locale/
567 define Package/cups-locale-sv/install
568 $(INSTALL_DIR) $(1)/usr/share/locale
569 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/sv $(1)/usr/share/locale/
572 define Package/cups-locale-da/install
573 $(INSTALL_DIR) $(1)/usr/share/locale
574 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/da $(1)/usr/share/locale/
577 define Package/cups-locale-ko/install
578 $(INSTALL_DIR) $(1)/usr/share/locale
579 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ko $(1)/usr/share/locale/
582 define Package/cups-locale-zh/install
583 $(INSTALL_DIR) $(1)/usr/share/locale
584 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/zh $(1)/usr/share/locale/
587 define Package/cups-locale-ja/install
588 $(INSTALL_DIR) $(1)/usr/share/locale
589 $(INSTALL_DIR) $(1)/usr/share/cups/templates
590 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ja $(1)/usr/share/locale/
591 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/ja \
592 $(1)/usr/share/cups/templates/
595 define Package/cups-locale-es/install
596 $(INSTALL_DIR) $(1)/usr/share/locale
597 $(INSTALL_DIR) $(1)/usr/share/cups/templates
598 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/es $(1)/usr/share/locale/
599 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/es \
600 $(1)/usr/share/cups/templates/
603 define Package/cups-locale-zh_TW/install
604 $(INSTALL_DIR) $(1)/usr/share/locale
605 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/zh_TW $(1)/usr/share/locale/
608 define Package/cups-locale-pl/install
609 $(INSTALL_DIR) $(1)/usr/share/locale
610 $(INSTALL_DIR) $(1)/usr/share/cups/templates
611 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pl $(1)/usr/share/locale/
612 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/pl \
613 $(1)/usr/share/cups/templates/
616 define Package/cups-locale-no/install
617 $(INSTALL_DIR) $(1)/usr/share/locale
618 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/no $(1)/usr/share/locale/
621 define Package/cups-locale-ru/install
622 $(INSTALL_DIR) $(1)/usr/share/locale
623 $(INSTALL_DIR) $(1)/usr/share/cups/templates
624 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ru $(1)/usr/share/locale/
625 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/ru \
626 $(1)/usr/share/cups/templates/
629 define Package/cups-locale-eu/install
630 $(INSTALL_DIR) $(1)/usr/share/locale
631 $(INSTALL_DIR) $(1)/usr/share/cups/templates
632 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/eu $(1)/usr/share/locale/
633 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/eu \
634 $(1)/usr/share/cups/templates/
637 define Package/cups-locale-fr/install
638 $(INSTALL_DIR) $(1)/usr/share/locale
639 $(INSTALL_DIR) $(1)/usr/share/cups/templates
640 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/fr $(1)/usr/share/locale/
641 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/fr \
642 $(1)/usr/share/cups/templates/
645 define Package/cups-locale-it/install
646 $(INSTALL_DIR) $(1)/usr/share/locale
647 $(INSTALL_DIR) $(1)/usr/share/cups/templates
648 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/it $(1)/usr/share/locale/
649 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/it \
650 $(1)/usr/share/cups/templates/
653 define Package/cups-locale-id/install
654 $(INSTALL_DIR) $(1)/usr/share/locale
655 $(INSTALL_DIR) $(1)/usr/share/cups/templates
656 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/id $(1)/usr/share/locale/
657 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/id \
658 $(1)/usr/share/cups/templates/
661 define Build/InstallDev
662 $(INSTALL_DIR) $(2)/bin
663 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
664 $(INSTALL_DIR) $(1)/usr/include
665 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
666 $(INSTALL_DIR) $(1)/usr/lib
667 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
670 $(eval $(call BuildPackage,cups))
671 $(eval $(call BuildPackage,libcups))
672 $(eval $(call BuildPackage,libcupscgi))
673 $(eval $(call BuildPackage,libcupsdriver))
674 $(eval $(call BuildPackage,libcupsimage))
675 $(eval $(call BuildPackage,libcupsmime))
676 $(eval $(call BuildPackage,libcupsppdc))
677 $(eval $(call BuildPackage,cups-bsd))
678 $(eval $(call BuildPackage,cups-client))
679 $(eval $(call BuildPackage,cups-filters))
680 $(eval $(call BuildPackage,cups-ppdc))
681 $(eval $(call BuildPackage,cups-locale-de))
682 $(eval $(call BuildPackage,cups-locale-nl))
683 $(eval $(call BuildPackage,cups-locale-hu))
684 $(eval $(call BuildPackage,cups-locale-pt))
685 $(eval $(call BuildPackage,cups-locale-pt_BR))
686 $(eval $(call BuildPackage,cups-locale-fi))
687 $(eval $(call BuildPackage,cups-locale-sv))
688 $(eval $(call BuildPackage,cups-locale-da))
689 $(eval $(call BuildPackage,cups-locale-ko))
690 $(eval $(call BuildPackage,cups-locale-zh))
691 $(eval $(call BuildPackage,cups-locale-ja))
692 $(eval $(call BuildPackage,cups-locale-es))
693 $(eval $(call BuildPackage,cups-locale-zh_TW))
694 $(eval $(call BuildPackage,cups-locale-pl))
695 $(eval $(call BuildPackage,cups-locale-no))
696 $(eval $(call BuildPackage,cups-locale-ru))
697 $(eval $(call BuildPackage,cups-locale-eu))
698 $(eval $(call BuildPackage,cups-locale-fr))
699 $(eval $(call BuildPackage,cups-locale-it))
700 $(eval $(call BuildPackage,cups-locale-id))