rename soekris port to x86
[openwrt.git] / openwrt / package / base-files / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=base-files
6 PKG_RELEASE:=5
7 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files
8
9 REV:=${shell svn info | grep Revision | cut -d ' ' -f 2}
10 ifeq ($(REV),)
11 REV:=0
12 endif
13
14 include $(TOPDIR)/package/rules.mk
15
16 IDIR_BASE:=$(PKG_BUILD_DIR)/base-files
17 IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk
18
19 IDIR_HOTPLUG:=$(PKG_BUILD_DIR)/hotplug
20 IPKG_HOTPLUG:=$(PACKAGE_DIR)/hotplug_$(PKG_RELEASE)_$(ARCH).ipk
21
22 LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version}
23 IDIR_LIBC:=$(PKG_BUILD_DIR)/uclibc
24 IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
25
26 GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
27 IDIR_GCC:=$(PKG_BUILD_DIR)/libgcc
28 IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
29
30 PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) $(IPKG_HOTPLUG)
31
32 $(PKG_BUILD_DIR)/.prepared:
33 mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR)
34 touch $@
35
36 $(PKG_BUILD_DIR)/.built:
37 touch $@
38
39 $(IPKG_BASE):
40 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH)
41 cp -a ./default/* $(IDIR_BASE)
42 $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner
43 mkdir -p $(IDIR_BASE)/jffs
44 mkdir -p $(IDIR_BASE)/dev
45 mkdir -p $(IDIR_BASE)/proc
46 mkdir -p $(IDIR_BASE)/tmp
47 mkdir -p $(IDIR_BASE)/lib
48 mkdir -p $(IDIR_BASE)/usr/lib
49 mkdir -p $(IDIR_BASE)/usr/bin
50 ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf
51 rm -rf $(IDIR_BASE)/var
52 ln -sf /tmp $(IDIR_BASE)/var
53 -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf
54 -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf
55 -find $(IDIR_BASE) -name '.#*' | xargs rm -f
56 mkdir -p $(IDIR_BASE)/etc
57 -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf
58 $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR)
59
60 $(IPKG_LIBC):
61 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH)
62 mkdir -p $(IDIR_LIBC)/lib
63 cp $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/
64 for file in c crypt dl m nsl resolv rt uClibc util; do \
65 cp $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \
66 done
67 -$(STRIP) $(IDIR_LIBC)/lib/*
68 $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR)
69
70 $(IPKG_GCC):
71 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH)
72 mkdir -p $(IDIR_GCC)/lib
73 cp -fpR $(STAGING_DIR)/lib/libgcc*.so.* $(IDIR_GCC)/lib/
74 -$(STRIP) $(IDIR_GCC)/lib/*
75 $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR)
76
77 $(IPKG_HOTPLUG):
78 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_HOTPLUG) ipkg/hotplug.control $(PKG_RELEASE) $(ARCH)
79 mkdir -p $(IDIR_HOTPLUG)/sbin
80 install -m0755 files/hotplug $(IDIR_HOTPLUG)/sbin
81 $(IPKG_BUILD) $(IDIR_HOTPLUG) $(PACKAGE_DIR)
82
83 package-clean:
84 rm -f $(PACKAGES)
85
86 clean-targets: package-clean
87 prepare:
88 compile-targets: $(PACKAGES)
89 install-targets: compile
90 mkdir -p $(TARGET_DIR)
91 $(IPKG) install $(PACKAGES)
This page took 0.043244 seconds and 5 git commands to generate.