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
/
18 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
22 $(PKG_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
23 mkdir
-p
$(TOOL_BUILD_DIR
)
24 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
25 touch
$(PKG_BUILD_DIR
)/.unpacked
27 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.unpacked
28 (cd
$(PKG_BUILD_DIR
); \
29 echo
"mr_cv_target_elf=$${mr_cv_target_elf=yes}" > config.cache
; \
30 $(TARGET_CONFIGURE_OPTS
) \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
38 touch
$(PKG_BUILD_DIR
)/.configured
40 $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
): $(PKG_BUILD_DIR
)/.configured
41 $(MAKE
) CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld ARCH
=$(ARCH
) \
44 $(STAGING_DIR
)/lib
/libelf.so
: $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
)
45 $(MAKE
) CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld ARCH
=$(ARCH
) \
46 -C
$(PKG_BUILD_DIR
)/lib instroot
="$(STAGING_DIR)" install
49 $(PKG_IPK
): $(PKG_BUILD_DIR
)/lib
/libelf.so.
$(LIBELF_VER
)
50 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
51 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
52 cp
-a
$(PKG_BUILD_DIR
)/lib
/libelf.so
* $(PKG_IPK_DIR
)/usr
/lib
/
53 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
54 mkdir
-p
$(PACKAGE_DIR
)
55 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
57 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
58 $(IPKG
) install $(PKG_IPK
)
60 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
61 prepare
: $(PKG_BUILD_DIR
)/.unpacked
62 compile
: $(STAGING_DIR
)/lib
/libelf.so
$(PKG_IPK
)
63 install: $(PKG_ZLIB
) $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
66 rm -rf
$(PKG_BUILD_DIR
)
67 rm -f
$(STAGING_DIR
)/lib
/$(PKG_NAME
)*
68 rm -f
$(PACKAGE_DIR
)/$(PKG_NAME
)\
*.ipk