[packages] add "ntfsprogs", utilities to manage ntfs volumes from within OpenWrt...
[openwrt/svn-archive/archive.git] / utils / ntfsprogs / Makefile
1 #
2 # Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it>
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:=ntfsprogs
11 PKG_VERSION:=2.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-ntfs
16 PKG_MD5SUM:=2c402b647bb7aeb1d3f8ce1cc354fd68
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ntfsprogs
21 SECTION:=utils
22 CATEGORY:=Utilities
23 SUBMENU:=Filesystem
24 TITLE:=Linux-NTFS
25 URL:=http://www.linux-ntfs.org/
26 MAINTAINER:=Gianluigi Tiesi <sherpya@netfarm.it>
27 endef
28
29 define Package/ntfsprogs/description
30 Tools for managing NTFS volumes from Linux
31 endef
32
33 CONFIGURE_ARGS += \
34 --enable-shared \
35 --enable-static \
36 --disable-gnome-vfs \
37 --disable-ntfsmount
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CC=$(TARGET_CC) \
42 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
43 LDFLAGS="$(TARGET_LDFLAGS)" \
44 prefix=/usr \
45 DESTDIR=$(PKG_INSTALL_DIR) \
46 all install
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs $(1)/usr/include
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs.{la,a,so*} $(1)/usr/lib
54 endef
55
56 define Package/ntfsprogs/install
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs.so.* $(1)/usr/lib
59 $(INSTALL_DIR) $(1)/usr/bin
60 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfsfix $(1)/usr/bin
61 $(INSTALL_DIR) $(1)/usr/sbin
62 $(FIND) $(PKG_INSTALL_DIR)/usr/sbin -type f -exec $(INSTALL_BIN) {} $(1)/usr/sbin \;
63 endef
64
65 $(eval $(call BuildPackage,ntfsprogs))