3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= c1daf069367871350ece779b7de20047
10 PKG_SOURCE_SITE
:= http
://www.mr511.de
/software
/
11 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_CAT
:= zcat
13 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
15 PKG_IPK
:= $(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
/
20 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
22 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
24 $(PKG_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
25 mkdir
-p
$(TOOL_BUILD_DIR
)
26 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
27 touch
$(PKG_BUILD_DIR
)/.unpacked
29 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.unpacked
30 (cd
$(PKG_BUILD_DIR
); \
31 echo
"mr_cv_target_elf=$${mr_cv_target_elf=yes}" > config.cache
; \
32 $(TARGET_CONFIGURE_OPTS
) \
34 --target
=$(GNU_TARGET_NAME
) \
35 --host
=$(GNU_TARGET_NAME
) \
36 --build
=$(GNU_HOST_NAME
) \
40 touch
$(PKG_BUILD_DIR
)/.configured
42 $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
): $(PKG_BUILD_DIR
)/.configured
43 $(MAKE
) -j1 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld ARCH
=$(ARCH
) \
46 $(STAGING_DIR
)/lib
/libelf.so
: $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
)
47 $(MAKE
) -j1 CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld ARCH
=$(ARCH
) \
48 -C
$(PKG_BUILD_DIR
)/lib instroot
="$(STAGING_DIR)" install
51 $(PKG_IPK
): $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
)
52 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
53 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
54 cp
-a
$(PKG_BUILD_DIR
)/lib
/libelf.so
* $(PKG_IPK_DIR
)/usr
/lib
/
55 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
56 mkdir
-p
$(PACKAGE_DIR
)
57 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
59 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
60 $(IPKG
) install $(PKG_IPK
)
62 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
63 prepare
: $(PKG_BUILD_DIR
)/.unpacked
64 compile
: $(STAGING_DIR
)/lib
/libelf.so
$(PKG_IPK
)
65 install: $(PKG_ZLIB
) $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
68 rm -rf
$(PKG_BUILD_DIR
)
69 rm -f
$(STAGING_DIR
)/lib
/$(PKG_NAME
)*
70 rm -f
$(PACKAGE_DIR
)/$(PKG_NAME
)\
*.ipk