540cecbf4a7da4b5e9baeaae7fde57dc2c68bffe
[openwrt/svn-archive/archive.git] / utils / sane-backends / Makefile
1 #
2 # Copyright (C) 2006 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.18
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:=7ca7e2908e24721471de92cf40c75e60
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/sane-backends/Default
25 TITLE:=Scanner Access Now Easy
26 URL:=http://www.sane-project.org/
27 endef
28
29 define Package/sane-backends
30 $(call Package/sane-backends/Default)
31 SECTION:=utils
32 CATEGORY:=Utilities
33 DEPENDS:=+sane-libs
34 TITLE+= (backends)
35 endef
36
37 define Package/sane-backends/description
38 SANE (Scanner Access Now Easy) is a universal scanner interface.
39 endef
40
41 define Package/sane-libs
42 $(call Package/sane-backends/Default)
43 SECTION:=libs
44 CATEGORY:=Libraries
45 TITLE+= (libraries)
46 endef
47
48 define Package/sane-libs/description
49 SANE (Scanner Access Now Easy) is a universal scanner interface.
50 endef
51
52 define Build/Configure
53 $(call Build/Configure/Default, \
54 --disable-ipv6 \
55 --disable-translations \
56 --without-gphoto2 \
57 --disable-debug \
58 )
59 endef
60
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 all install
65 endef
66
67 define Package/sane-backends/conffiles
68 /etc/sane.d/saned.conf
69 endef
70
71 define Package/sane-backends/install
72 $(INSTALL_DIR) $(1)/etc/sane.d
73 $(CP) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(1)/etc/sane.d/
74 $(INSTALL_DIR) $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/saned $(1)/usr/sbin/
76 endef
77
78 define Package/sane-libs/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/
81 $(INSTALL_DIR) $(1)/usr/lib/sane
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-*.so.* $(1)/usr/lib/sane/
83 endef
84
85 define Build/InstallDev
86 mkdir -p $(1)/usr/include
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/
88 mkdir -p $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{la,so*} $(1)/usr/lib/
90 endef
91
92 $(eval $(call BuildPackage,sane-backends))
93 $(eval $(call BuildPackage,sane-libs))