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
16 http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/cups/$(PKG_VERSION) \
17 ftp://ftp.easysw.com/pub/cups/$(PKG_VERSION) \
18 ftp://ftp3.easysw.com/pub/cups/$(PKG_VERSION)
19 PKG_MD5SUM:=de3006e5cf1ee78a9c6145ce62c4e982
21 TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
23 include $(INCLUDE_DIR)/package.mk
25 define Package/cups/Default
26 URL:=http://www.cups.org/
31 $(call Package/cups/Default)
34 DEPENDS:=+libcups +libcupsmime +libcupscgi +libcupsppdc +libusb
35 TITLE:=Common UNIX Printing System (daemon)
38 define Package/cups/description
39 Common UNIX Printing System (daemon)
42 define Package/cups/conffiles
43 /etc/cups/classes.conf
45 /etc/cups/printers.conf
48 define Package/cups-bsd
49 $(call Package/cups/Default)
53 TITLE:=Common UNIX Printing System - BSD commands (old)
56 define Package/cups-bsd/description
57 Common UNIX Printing System - BSD commands (old)
60 define Package/cups-client
61 $(call Package/cups/Default)
64 DEPENDS:=+libcups +libcupsimage +libcupsmime
65 TITLE:=Common UNIX Printing System - Client commands
68 define Package/cups-client/conffiles
72 define Package/cups-client/description
73 Common UNIX Printing System - Client commands
76 define Package/cups-filters
77 $(call Package/cups/Default)
80 DEPENDS:=+libcupsimage +libcupsdriver
81 TITLE:=Common UNIX Printing System - Filter
84 define Package/cups-filters/description
85 Common UNIX Printing System - Filter
88 define Package/cups-ppdc
89 $(call Package/cups/Default)
93 TITLE:=Common UNIX Printing System - PPDC utils
96 define Package/cups-ppdc/description
97 Common UNIX Printing System - PPDC utils
100 define Package/libcups
101 $(call Package/cups/Default)
104 DEPENDS:=+zlib +libpthread +libpng +libjpeg
105 TITLE:=Common UNIX Printing System - Core library
108 define Package/libcups/description
109 Common UNIX Printing System - Core library
112 define Package/libcupscgi
113 $(call Package/cups/Default)
117 TITLE:=Common UNIX Printing System - CGI library
120 define Package/libcupscgi/description
121 Common UNIX Printing System - CGI library
124 define Package/libcupsdriver
125 $(call Package/cups/Default)
129 TITLE:=Common UNIX Printing System - Driver library
132 define Package/libcupsdriver/description
133 Common UNIX Printing System - Driver library
136 define Package/libcupsimage
137 $(call Package/cups/Default)
140 DEPENDS:=+libcups +libpng +libjpeg
141 TITLE:=Common UNIX Printing System - Image library
144 define Package/libcupsimage/description
145 Common UNIX Printing System - Image library
148 define Package/libcupsmime
149 $(call Package/cups/Default)
153 TITLE:=Common UNIX Printing System - MIME library
156 define Package/libcupsmime/description
157 Common UNIX Printing System - MIME library
160 define Package/libcupsppdc
161 $(call Package/cups/Default)
164 DEPENDS:=+libcups +libstdcpp
165 TITLE:=Common UNIX Printing System - PPDC library
168 define Package/libcupsppdc/description
169 Common UNIX Printing System - PPDC library
172 define Package/cups-locale-de
173 $(call Package/cups/Default)
176 TITLE:=Common UNIX Printing System - Locale de
179 define Package/cups-locale-de/description
180 Common UNIX Printing System - Locale de
183 define Package/cups-locale-nl
184 $(call Package/cups/Default)
187 TITLE:=Common UNIX Printing System - Locale nl
190 define Package/cups-locale-nl/description
191 Common UNIX Printing System - Locale nl
194 define Package/cups-locale-hu
195 $(call Package/cups/Default)
198 TITLE:=Common UNIX Printing System - Locale hu
201 define Package/cups-locale-hu/description
202 Common UNIX Printing System - Locale hu
205 define Package/cups-locale-pt
206 $(call Package/cups/Default)
209 TITLE:=Common UNIX Printing System - Locale pt
212 define Package/cups-locale-pt/description
213 Common UNIX Printing System - Locale pt
216 define Package/cups-locale-pt_BR
217 $(call Package/cups/Default)
220 TITLE:=Common UNIX Printing System - Locale pt_BR
223 define Package/cups-locale-pt_BR/description
224 Common UNIX Printing System - Locale pt_BR
227 define Package/cups-locale-fi
228 $(call Package/cups/Default)
231 TITLE:=Common UNIX Printing System - Locale fi
234 define Package/cups-locale-fi/description
235 Common UNIX Printing System - Locale fi
238 define Package/cups-locale-sv
239 $(call Package/cups/Default)
242 TITLE:=Common UNIX Printing System - Locale sv
245 define Package/cups-locale-sv/description
246 Common UNIX Printing System - Locale sv
249 define Package/cups-locale-da
250 $(call Package/cups/Default)
253 TITLE:=Common UNIX Printing System - Locale da
256 define Package/cups-locale-da/description
257 Common UNIX Printing System - Locale da
260 define Package/cups-locale-ko
261 $(call Package/cups/Default)
264 TITLE:=Common UNIX Printing System - Locale ko
267 define Package/cups-locale-ko/description
268 Common UNIX Printing System - Locale ko
271 define Package/cups-locale-zh
272 $(call Package/cups/Default)
275 TITLE:=Common UNIX Printing System - Locale zh
278 define Package/cups-locale-zh/description
279 Common UNIX Printing System - Locale zh
282 define Package/cups-locale-ja
283 $(call Package/cups/Default)
286 TITLE:=Common UNIX Printing System - Locale ja
289 define Package/cups-locale-ja/description
290 Common UNIX Printing System - Locale ja
293 define Package/cups-locale-es
294 $(call Package/cups/Default)
297 TITLE:=Common UNIX Printing System - Locale es
300 define Package/cups-locale-es/description
301 Common UNIX Printing System - Locale es
304 define Package/cups-locale-zh_TW
305 $(call Package/cups/Default)
308 TITLE:=Common UNIX Printing System - Locale zh_TW
311 define Package/cups-locale-zh_TW/description
312 Common UNIX Printing System - Locale zh_TW
315 define Package/cups-locale-pl
316 $(call Package/cups/Default)
319 TITLE:=Common UNIX Printing System - Locale pl
322 define Package/cups-locale-pl/description
323 Common UNIX Printing System - Locale pl
326 define Package/cups-locale-no
327 $(call Package/cups/Default)
330 TITLE:=Common UNIX Printing System - Locale no
333 define Package/cups-locale-no/description
334 Common UNIX Printing System - Locale no
337 define Package/cups-locale-ru
338 $(call Package/cups/Default)
341 TITLE:=Common UNIX Printing System - Locale ru
344 define Package/cups-locale-ru/description
345 Common UNIX Printing System - Locale ru
348 define Package/cups-locale-eu
349 $(call Package/cups/Default)
352 TITLE:=Common UNIX Printing System - Locale eu
355 define Package/cups-locale-eu/description
356 Common UNIX Printing System - Locale eu
359 define Package/cups-locale-fr
360 $(call Package/cups/Default)
363 TITLE:=Common UNIX Printing System - Locale fr
366 define Package/cups-locale-fr/description
367 Common UNIX Printing System - Locale fr
370 define Package/cups-locale-it
371 $(call Package/cups/Default)
374 TITLE:=Common UNIX Printing System - Locale it
377 define Package/cups-locale-it/description
378 Common UNIX Printing System - Locale it
381 define Package/cups-locale-id
382 $(call Package/cups/Default)
385 TITLE:=Common UNIX Printing System - Locale id
388 define Package/cups-locale-id/description
389 Common UNIX Printing System - Locale id
392 define Build/Configure
393 $(call Build/Configure/Default, \
394 --with-cups-user="nobody" \
395 --with-cups-group="nogroup" \
396 --with-components="embedded" \
416 LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \
421 $(MAKE) -C $(PKG_BUILD_DIR) \
422 $(TARGET_CONFIGURE_OPTS) \
423 DSTROOT="$(PKG_INSTALL_DIR)" \
428 define Package/cups/install
430 $(INSTALL_DIR) $(1)/etc/cups
431 $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(1)/etc/cups/
432 rm -rf $(1)/etc/cups/certs
433 ln -sf /tmp $(1)/etc/cups/certs
434 rm -f $(1)/usr/bin/cups-config
435 $(INSTALL_DIR) $(1)/usr/lib/cups
436 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/backend $(1)/usr/lib/cups
437 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/cgi-bin $(1)/usr/lib/cups
438 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/daemon $(1)/usr/lib/cups
439 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/driver $(1)/usr/lib/cups
440 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/monitor $(1)/usr/lib/cups
441 $(INSTALL_DIR) $(1)/usr/lib/cups/filter
442 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/filter/{commandtops,pstops} \
443 $(PKG_INSTALL_DIR)/usr/lib/cups/filter/gziptoany \
444 $(1)/usr/lib/cups/filter
445 $(INSTALL_DIR) $(1)/usr/share/cups/templates
446 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl \
447 $(1)/usr/share/cups/templates/
448 $(INSTALL_DIR) $(1)/usr/share/cups/mime
449 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/mime/* $(1)/usr/share/cups/mime/
450 $(INSTALL_DIR) $(1)/usr/share/doc/cups
451 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html \
452 $(1)/usr/share/doc/cups/
453 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/*.css \
454 $(1)/usr/share/doc/cups/
455 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images \
456 $(1)/usr/share/doc/cups/
457 $(INSTALL_DIR) $(1)/usr/sbin
458 # overwrite default config with our own
459 $(CP) ./files/etc/cups/* $(1)/etc/cups/
460 # install initscript with priority 60
461 $(INSTALL_DIR) $(1)/etc/init.d
462 $(INSTALL_BIN) ./files/cupsd.init $(1)/etc/init.d/cupsd
464 $(PKG_INSTALL_DIR)/usr/sbin/{cupsctl,cupsd} \
468 define Package/cups-bsd/install
469 $(INSTALL_DIR) $(1)/usr/bin
470 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{lprm,lpq,lpr} $(1)/usr/bin/
471 $(INSTALL_DIR) $(1)/usr/sbin
472 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lpc $(1)/usr/sbin/
475 define Package/cups-client/install
476 $(INSTALL_DIR) $(1)/usr/bin
478 $(PKG_INSTALL_DIR)/usr/bin/{lp,cancel,cupstestppd,cupstestdsc} \
479 $(PKG_INSTALL_DIR)/usr/bin/{ipptool,lpoptions,lpstat,lppasswd} \
481 $(INSTALL_DIR) $(1)/usr/sbin
483 $(PKG_INSTALL_DIR)/usr/sbin/{cupsaccept,cupsaddsmb,cupsfilter} \
484 $(PKG_INSTALL_DIR)/usr/sbin/{lpadmin,lpinfo,lpmove} \
486 (cd $(1)/usr/sbin; ln -sf cupsaccept accept;
487 ln -sf cupsaccept cupsenable; ln -sf cupsaccept cupsdisable;
488 ln -sf cupsaccept reject; ln -sf cupsaccept cupsreject;)
491 define Package/cups-filters/install
492 $(INSTALL_DIR) $(1)/usr/lib/cups/filter
493 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups/filter/{bannertops,commandtoescpx,commandtopclx,imagetops,imagetoraster,pdftops,rastertoepson,rastertopwg,rastertohp,rastertoescpx,rastertopclx,rastertolabel,texttops} \
494 $(1)/usr/lib/cups/filter
495 (cd $(1)/usr/lib/cups/filter; ln -sf rastertolabel rastertodymo;)
498 define Package/cups-ppdc/install
499 $(INSTALL_DIR) $(1)/usr/bin
501 $(PKG_INSTALL_DIR)/usr/bin/{ppdc,ppdhtml,ppdi,ppdmerge,ppdpo} \
505 define Package/libcups/install
506 $(INSTALL_DIR) $(1)/usr/lib
507 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so* $(1)/usr/lib/
510 define Package/libcupscgi/install
511 $(INSTALL_DIR) $(1)/usr/lib
512 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupscgi.so* $(1)/usr/lib/
515 define Package/libcupsdriver/install
516 $(INSTALL_DIR) $(1)/usr/lib
517 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsdriver.so* $(1)/usr/lib/
520 define Package/libcupsimage/install
521 $(INSTALL_DIR) $(1)/usr/lib
522 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsimage.so* $(1)/usr/lib/
525 define Package/libcupsmime/install
526 $(INSTALL_DIR) $(1)/usr/lib
527 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsmime.so* $(1)/usr/lib/
530 define Package/libcupsppdc/install
531 $(INSTALL_DIR) $(1)/usr/lib
532 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcupsppdc.so* $(1)/usr/lib/
535 define Package/cups-locale-de/install
536 $(INSTALL_DIR) $(1)/usr/share/locale
537 $(INSTALL_DIR) $(1)/usr/share/cups/templates
538 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/de $(1)/usr/share/locale/
539 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/de \
540 $(1)/usr/share/cups/templates/
543 define Package/cups-locale-nl/install
544 $(INSTALL_DIR) $(1)/usr/share/locale
545 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/nl $(1)/usr/share/locale/
548 define Package/cups-locale-hu/install
549 $(INSTALL_DIR) $(1)/usr/share/locale
550 $(INSTALL_DIR) $(1)/usr/share/cups/templates
551 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/hu $(1)/usr/share/locale/
552 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/hu \
553 $(1)/usr/share/cups/templates/
556 define Package/cups-locale-pt/install
557 $(INSTALL_DIR) $(1)/usr/share/locale
558 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pt $(1)/usr/share/locale/
561 define Package/cups-locale-pt_BR/install
562 $(INSTALL_DIR) $(1)/usr/share/locale
563 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pt_BR $(1)/usr/share/locale/
566 define Package/cups-locale-fi/install
567 $(INSTALL_DIR) $(1)/usr/share/locale
568 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/fi $(1)/usr/share/locale/
571 define Package/cups-locale-sv/install
572 $(INSTALL_DIR) $(1)/usr/share/locale
573 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/sv $(1)/usr/share/locale/
576 define Package/cups-locale-da/install
577 $(INSTALL_DIR) $(1)/usr/share/locale
578 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/da $(1)/usr/share/locale/
581 define Package/cups-locale-ko/install
582 $(INSTALL_DIR) $(1)/usr/share/locale
583 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ko $(1)/usr/share/locale/
586 define Package/cups-locale-zh/install
587 $(INSTALL_DIR) $(1)/usr/share/locale
588 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/zh $(1)/usr/share/locale/
591 define Package/cups-locale-ja/install
592 $(INSTALL_DIR) $(1)/usr/share/locale
593 $(INSTALL_DIR) $(1)/usr/share/cups/templates
594 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ja $(1)/usr/share/locale/
595 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/ja \
596 $(1)/usr/share/cups/templates/
599 define Package/cups-locale-es/install
600 $(INSTALL_DIR) $(1)/usr/share/locale
601 $(INSTALL_DIR) $(1)/usr/share/cups/templates
602 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/es $(1)/usr/share/locale/
603 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/es \
604 $(1)/usr/share/cups/templates/
607 define Package/cups-locale-zh_TW/install
608 $(INSTALL_DIR) $(1)/usr/share/locale
609 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/zh_TW $(1)/usr/share/locale/
612 define Package/cups-locale-pl/install
613 $(INSTALL_DIR) $(1)/usr/share/locale
614 $(INSTALL_DIR) $(1)/usr/share/cups/templates
615 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/pl $(1)/usr/share/locale/
616 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/pl \
617 $(1)/usr/share/cups/templates/
620 define Package/cups-locale-no/install
621 $(INSTALL_DIR) $(1)/usr/share/locale
622 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/no $(1)/usr/share/locale/
625 define Package/cups-locale-ru/install
626 $(INSTALL_DIR) $(1)/usr/share/locale
627 $(INSTALL_DIR) $(1)/usr/share/cups/templates
628 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/ru $(1)/usr/share/locale/
629 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/ru \
630 $(1)/usr/share/cups/templates/
633 define Package/cups-locale-eu/install
634 $(INSTALL_DIR) $(1)/usr/share/locale
635 $(INSTALL_DIR) $(1)/usr/share/cups/templates
636 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/eu $(1)/usr/share/locale/
637 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/eu \
638 $(1)/usr/share/cups/templates/
641 define Package/cups-locale-fr/install
642 $(INSTALL_DIR) $(1)/usr/share/locale
643 $(INSTALL_DIR) $(1)/usr/share/cups/templates
644 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/fr $(1)/usr/share/locale/
645 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/fr \
646 $(1)/usr/share/cups/templates/
649 define Package/cups-locale-it/install
650 $(INSTALL_DIR) $(1)/usr/share/locale
651 $(INSTALL_DIR) $(1)/usr/share/cups/templates
652 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/it $(1)/usr/share/locale/
653 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/it \
654 $(1)/usr/share/cups/templates/
657 define Package/cups-locale-id/install
658 $(INSTALL_DIR) $(1)/usr/share/locale
659 $(INSTALL_DIR) $(1)/usr/share/cups/templates
660 $(CP) $(PKG_INSTALL_DIR)/usr/share/locale/id $(1)/usr/share/locale/
661 $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/id \
662 $(1)/usr/share/cups/templates/
665 define Build/InstallDev
666 $(INSTALL_DIR) $(2)/bin
667 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(2)/bin/
668 $(INSTALL_DIR) $(1)/usr/include
669 $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(1)/usr/include/
670 $(INSTALL_DIR) $(1)/usr/lib
671 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups*.so* $(1)/usr/lib/
674 $(eval $(call BuildPackage,cups))
675 $(eval $(call BuildPackage,libcups))
676 $(eval $(call BuildPackage,libcupscgi))
677 $(eval $(call BuildPackage,libcupsdriver))
678 $(eval $(call BuildPackage,libcupsimage))
679 $(eval $(call BuildPackage,libcupsmime))
680 $(eval $(call BuildPackage,libcupsppdc))
681 $(eval $(call BuildPackage,cups-bsd))
682 $(eval $(call BuildPackage,cups-client))
683 $(eval $(call BuildPackage,cups-filters))
684 $(eval $(call BuildPackage,cups-ppdc))
685 $(eval $(call BuildPackage,cups-locale-de))
686 $(eval $(call BuildPackage,cups-locale-nl))
687 $(eval $(call BuildPackage,cups-locale-hu))
688 $(eval $(call BuildPackage,cups-locale-pt))
689 $(eval $(call BuildPackage,cups-locale-pt_BR))
690 $(eval $(call BuildPackage,cups-locale-fi))
691 $(eval $(call BuildPackage,cups-locale-sv))
692 $(eval $(call BuildPackage,cups-locale-da))
693 $(eval $(call BuildPackage,cups-locale-ko))
694 $(eval $(call BuildPackage,cups-locale-zh))
695 $(eval $(call BuildPackage,cups-locale-ja))
696 $(eval $(call BuildPackage,cups-locale-es))
697 $(eval $(call BuildPackage,cups-locale-zh_TW))
698 $(eval $(call BuildPackage,cups-locale-pl))
699 $(eval $(call BuildPackage,cups-locale-no))
700 $(eval $(call BuildPackage,cups-locale-ru))
701 $(eval $(call BuildPackage,cups-locale-eu))
702 $(eval $(call BuildPackage,cups-locale-fr))
703 $(eval $(call BuildPackage,cups-locale-it))
704 $(eval $(call BuildPackage,cups-locale-id))