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