replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / net / nfs-kernel-server / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=nfs-kernel-server
6 PKG_VERSION:=1.0.7
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=8f863120261cd572ad320a9152581e11
9
10 PKG_SOURCE_URL:=@SF/nfs
11 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/nfs-kernel-server
20 SECTION:=net
21 CATEGORY:=Network
22 TITLE:=Kernel NFS server support
23 DESCRIPTION:=Kernel NFS server support
24 URL:=http://nfs.sourceforge.net/
25 endef
26
27 define Package/nfs-kernel-server-utils
28 SECTION:=net
29 CATEGORY:=Network
30 TITLE:=NFS server utils
31 DESCRIPTION:=NFS server utils
32 URL:=http://nfs.sourceforge.net
33 DEPENDS:=nfs-kernel-server
34 DEFAULT:=y
35 endef
36
37
38 define Package/nfs-kernel-server/conffiles
39 /etc/exports
40 endef
41
42 define Build/Configure
43 $(call Build/Configure/Default, \
44 --enable-static \
45 --enable-shared \
46 --disable-nfsv4 \
47 --disable-gss \
48 )
49 endef
50
51 define Build/Compile
52 rm -rf $(PKG_INSTALL_DIR)
53 mkdir -p $(PKG_INSTALL_DIR)
54 $(MAKE) -C $(PKG_BUILD_DIR)
55 endef
56
57 define Package/nfs-kernel-server/install
58 $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
59 $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports
60 $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/lockd/lockd $(1)/usr/sbin/rpc.lockd
62 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/
66 endef
67
68 define Package/nfs-kernel-server-utils/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin
71 $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin
72 endef
73
74 $(eval $(call BuildPackage,nfs-kernel-server))
75 $(eval $(call BuildPackage,nfs-kernel-server-utils))