summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/make/nfs-modules.mk
blob: f00fe7fb9665d003bd95787bb976fb72007eabce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## nfs-modules

NFS_MODULES_VERSION := $(SNAPSHOT)
NFS_MODULES_RELEASE := 1

NFS_MODULES_BUILD_DIR := $(BUILD_DIR)/nfs-modules_$(NFS_MODULES_VERSION)-$(NFS_MODULES_RELEASE)
NFS_MODULES_IPK_DIR := $(OPENWRT_IPK_DIR)/nfs-modules
NFS_MODULES_IPK := $(NFS_MODULES_BUILD_DIR)_$(ARCH).ipk


$(NFS_MODULES_BUILD_DIR)/CONTROL/control: $(BASE_DIR)/openwrt-kmodules.tar.bz2
	rm -rf $(NFS_MODULES_BUILD_DIR)
	mkdir -p $(NFS_MODULES_BUILD_DIR)/lib/
	bzcat $(BASE_DIR)/openwrt-kmodules.tar.bz2 | tar -C $(NFS_MODULES_BUILD_DIR)/lib/ -xvf - \
	 modules/$(LINUX_VERSION)/kernel/fs/lockd/lockd.o \
	 modules/$(LINUX_VERSION)/kernel/fs/nfs/nfs.o \
	 modules/$(LINUX_VERSION)/kernel/net/sunrpc/sunrpc.o
	mv -f \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/lockd/*.o \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/
	mv -f \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/nfs/*.o \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/
	mv -f \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/kernel/net/sunrpc/*.o \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/
	rm -rf \
	 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/kernel
	chmod 0755 $(NFS_MODULES_BUILD_DIR)/lib
	chmod 0755 $(NFS_MODULES_BUILD_DIR)/lib/modules
	chmod 0755 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)
	chmod 0755 $(NFS_MODULES_BUILD_DIR)/lib/modules/$(LINUX_VERSION)/*
	cp -a $(NFS_MODULES_IPK_DIR)/CONTROL $(NFS_MODULES_BUILD_DIR)/
	perl -pi -e "s/^Vers.*:.*$$/Version: $(NFS_MODULES_VERSION)-$(NFS_MODULES_RELEASE)/" $(NFS_MODULES_BUILD_DIR)/CONTROL/control
	perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(NFS_MODULES_BUILD_DIR)/CONTROL/control

	touch $(NFS_MODULES_BUILD_DIR)/CONTROL/control


$(NFS_MODULES_IPK): $(NFS_MODULES_BUILD_DIR)/CONTROL/control
	cd $(BUILD_DIR); $(IPKG_BUILD) $(NFS_MODULES_BUILD_DIR)


nfs-modules-ipk: ipkg-utils $(NFS_MODULES_IPK)

nfs-modules-clean:
	rm -rf $(NFS_MODULES_IPK)
	rm -rf $(NFS_MODULES_BUILD_DIR)