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