diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bzip2.mk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/bzip2.mk b/src/bzip2.mk new file mode 100644 index 0000000..523213b --- /dev/null +++ b/src/bzip2.mk @@ -0,0 +1,29 @@ +# bzip2 +# http://www.bzip.org/ + +PKG := bzip2 +$(PKG)_VERSION := 1.0.5 +$(PKG)_SUBDIR := bzip2-$($(PKG)_VERSION) +$(PKG)_FILE := bzip2-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://www.bzip.org/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + wget -q -O- 'http://www.bzip.org/downloads.html' | \ + grep 'bzip2-' | \ + $(SED) -n 's,.*bzip2-\([1-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + $(SED) 's,sys\\stat\.h,sys/stat.h,g' -i '$(1)/bzip2.c' + $(MAKE) -C '$(1)' -j '$(JOBS)' libbz2.a \ + PREFIX='$(PREFIX)/$(TARGET)' \ + CC='$(TARGET)-gcc' \ + AR='$(TARGET)-ar' \ + RANLIB='$(TARGET)-ranlib' + install -d '$(PREFIX)/$(TARGET)/lib' + install -m664 '$(1)/libbz2.a' '$(PREFIX)/$(TARGET)/lib/' + install -d '$(PREFIX)/$(TARGET)/include' + install -m664 '$(1)/bzlib.h' '$(PREFIX)/$(TARGET)/include/' +endef |