d28a8460ac72d0d968273eaad7673502b2024d7b
[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:=1
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 CONFIGURE_ARGS+= \
57 --enable-shared \
58 --enable-static \
59 --disable-ipv6 \
60 --disable-translations \
61 --without-gphoto2 \
62 --disable-debug \
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 DESTDIR="$(PKG_INSTALL_DIR)" \
67 all install
68 endef
69
70 define Package/sane-backends/conffiles
71 /etc/sane.d/saned.conf
72 endef
73
74 define Package/sane-backends/install
75 $(INSTALL_DIR) $(1)/etc/sane.d
76 $(CP) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(1)/etc/sane.d/
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/saned $(1)/usr/sbin/
79 endef
80
81 define Package/sane-libs/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/
84 $(INSTALL_DIR) $(1)/usr/lib/sane
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-*.so.* $(1)/usr/lib/sane/
86 endef
87
88 define Build/InstallDev
89 mkdir -p $(1)/usr/include
90 $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/
91 mkdir -p $(1)/usr/lib
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/
93 endef
94
95 $(eval $(call BuildPackage,sane-backends))
96 $(eval $(call BuildPackage,sane-libs))