add conffiles for base-files
[openwrt.git] / package / base-files / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include $(TOPDIR)/package/kernel.mk
5
6 PKG_NAME:=base-files
7 PKG_RELEASE:=8
8 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files
9
10 REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
11 ifeq ($(REV),)
12 REV:=0
13 endif
14
15 include $(TOPDIR)/package/rules.mk
16
17 ifneq ($(DUMP),1)
18 TARGET:=-$(BOARD)-$(KERNEL)
19 UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version}
20 LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
21 endif
22
23 CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
24
25 define Package/base-files$(TARGET)
26 SECTION:=base
27 CATEGORY:=Base system
28 DEFAULT:=y
29 TITLE:=OpenWrt system scripts
30 DESCRIPTION:=Base filesystem for OpenWrt
31 VERSION:=$(PKG_RELEASE)
32 endef
33
34 define -ar7-2.4/conffiles
35 /etc/config/network
36 endef
37
38 define -aruba-2.6/conffiles
39 /etc/config/network
40 endef
41
42 define -au1000-2.6/conffiles
43 /etc/config/network
44 endef
45
46 define -rb532-2.6/conffiles
47 /etc/config/network
48 endef
49
50 define -sibyte-2.6/conffiles
51 /etc/config/network
52 endef
53
54 define -x86-2.6/conffiles
55 /etc/config/network
56 endef
57
58 define -xscale-2.6/conffiles
59 /etc/config/network
60 endef
61
62
63 define Package/base-files$(TARGET)/conffiles
64 /etc/banner
65 /etc/hosts
66 /etc/inittab
67 /etc/group
68 /etc/passwd
69 /etc/profile
70 /etc/shells
71 /etc/ipkg.conf
72 /etc/sysctl.conf
73 $(call $(TARGET)/conffiles)
74 endef
75
76 define Package/libgcc
77 SECTION:=libs
78 CATEGORY:=Libraries
79 DEFAULT:=y
80 TITLE:=GCC support library
81 VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
82 DESCRIPTION:=$(TITLE)
83 endef
84
85 define Package/uclibc
86 $(call Package/base-files$(TARGET))
87 VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
88 TITLE:=C library
89 DESCRIPTION:=C library for embedded systems
90 endef
91
92 define Build/Prepare
93 mkdir -p $(PKG_BUILD_DIR)
94 endef
95
96
97 define Build/Compile/ar7
98 $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c
99 endef
100
101 define Build/Compile/brcm
102 $(TARGET_CC) -o $(PKG_BUILD_DIR)/jffs2root src/jffs2root.c
103 endef
104
105 define Build/Compile
106 $(call Build/Compile/$(BOARD))
107 endef
108
109
110 define Package/base-files$(TARGET)/install-ar7
111 mkdir -p $(1)/sbin
112 $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin
113 endef
114 define Package/base-files$(TARGET)/install-brcm
115 mkdir -p $(1)/sbin
116 $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin
117 endef
118
119 define Package/base-files$(TARGET)/install
120 $(call Package/base-files$(TARGET)/install-$(BOARD),$(1))
121 $(CP) ./default/* $(1)/
122 if [ -d $(BOARD)-$(KERNEL) ]; then \
123 $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \
124 fi
125 $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner
126 $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf
127 mkdir -p $(1)/dev
128 mkdir -p $(1)/etc/crontabs
129 mkdir -p $(1)/jffs
130 mkdir -p $(1)/lib
131 mkdir -p $(1)/mnt
132 mkdir -p $(1)/proc
133 mkdir -p $(1)/tmp
134 mkdir -p $(1)/usr/lib
135 mkdir -p $(1)/usr/bin
136 mkdir -p $(1)/sys
137 mkdir -p $(1)/www
138 ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf
139 ln -sf /proc/mounts $(1)/etc/mtab
140 rm -f $(1)/var
141 ln -sf /tmp $(1)/var
142 mkdir -p $(1)/etc
143 endef
144
145 define Package/uclibc/install
146 mkdir -p $(1)/lib
147 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \
148 $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \
149 $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \
150 done
151 endef
152
153 define Package/libgcc/install
154 mkdir -p $(1)/lib
155 $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/
156 endef
157
158 $(eval $(call BuildPackage,base-files$(TARGET)))
159 $(eval $(call BuildPackage,libgcc))
160 $(eval $(call BuildPackage,uclibc))
This page took 0.051811 seconds and 5 git commands to generate.