Package sane-frontends, bump release number (#4382)
[openwrt/svn-archive/archive.git] / utils / sane-backends / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sane-backends
12 PKG_VERSION:=1.0.19
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION)/
17 PKG_MD5SUM:=8c0936272dcfd4e98c51512699f1c06f
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/sane-backends/Default
22 TITLE:=Scanner Access Now Easy
23 URL:=http://www.sane-project.org/
24 endef
25
26 define Package/sane-backends/Default/description
27 SANE (Scanner Access Now Easy) is a universal scanner interface.
28 endef
29
30 define Package/sane-backends
31 $(call Package/sane-backends/Default)
32 SECTION:=utils
33 CATEGORY:=Utilities
34 DEPENDS:=+sane-libs
35 TITLE+= (backends)
36 endef
37
38 define Package/sane-backends/description
39 $(call Package/sane-backends/Default/description)
40 This package contains the SANE daemon.
41 endef
42
43 define Package/sane-libs
44 $(call Package/sane-backends/Default)
45 SECTION:=libs
46 CATEGORY:=Libraries
47 DEPENDS:=+libjpeg +libpthread +libusb
48 TITLE+= (libraries)
49 endef
50
51 define Package/sane-libs/description
52 $(call Package/sane-backends/Default/description)
53 This package contains the SANE shared libraries.
54 endef
55
56 define Package/sane-frontends
57 $(call Package/sane-backends/Default)
58 SECTION:=utils
59 CATEGORY:=Utilities
60 DEPENDS:=+sane-backends
61 TITLE+= (frontends)
62 endef
63
64 define Package/sane-frontends/description
65 $(call Package/sane-backends/Default/description)
66 This package contains the SANE frontends.
67 endef
68
69 CONFIGURE_ARGS+= \
70 --enable-shared \
71 --enable-static \
72 --disable-ipv6 \
73 --disable-translations \
74 --without-gphoto2 \
75 --disable-debug \
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 DESTDIR="$(PKG_INSTALL_DIR)" \
80 all install
81 endef
82
83 define Package/sane-backends/conffiles
84 /etc/sane.d/saned.conf
85 endef
86
87 define Package/sane-backends/install
88 $(INSTALL_DIR) $(1)/etc/sane.d
89 $(CP) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(1)/etc/sane.d/
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
92 endef
93
94 define Package/sane-libs/install
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/
97 $(INSTALL_DIR) $(1)/usr/lib/sane
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-*.so.* $(1)/usr/lib/sane/
99 endef
100
101 define Package/sane-frontends/install
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
104 endef
105
106 define Build/InstallDev
107 mkdir -p $(1)/usr/include
108 $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/
109 mkdir -p $(1)/usr/lib
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/
111 endef
112
113 $(eval $(call BuildPackage,sane-backends))
114 $(eval $(call BuildPackage,sane-libs))
115 $(eval $(call BuildPackage,sane-frontends))