summaryrefslogtreecommitdiffhomepage
path: root/307.libz.build
diff options
context:
space:
mode:
Diffstat (limited to '307.libz.build')
-rw-r--r--307.libz.build42
1 files changed, 42 insertions, 0 deletions
diff --git a/307.libz.build b/307.libz.build
new file mode 100644
index 00000000..a6f48d59
--- /dev/null
+++ b/307.libz.build
@@ -0,0 +1,42 @@
+parse_with_pkg_name ${2} libz gzip;
+if is_build_script_done finished; then
+ exit 212;
+else
+ fetch ${PKG_URL} ${PKG_SHA256SUM};
+fi;
+if ! is_build_script_done extracted; then
+ rm_if_exists ${PKG_FNAME%%.tar*};
+ tar -axf ${PKG_FNAME};
+ set_build_script_done extracted -configured;
+fi;
+if ! is_build_script_done configured; then
+ set_build_dir ${PKG_FNAME%%-*} native;
+ rm_if_exists -c -m ${BUILD_DIR};
+ cp ../portage/config.cache .;
+ ../${PKG_SUBDIR}/configure \
+ --host=${HOST_NATIVE} \
+ --prefix= \
+ --target=${TARGET};
+ set_build_script_done configured -built;
+else
+ cd ${BUILD_DIR};
+fi;
+if ! is_build_script_done built; then
+ if [ "x${2}" = "xlibz" ]; then
+ make -j18;
+ elif [ "x${2}" = "xgzip" ]; then
+ make clean;
+ make;
+ fi;
+ set_build_script_done built -installed;
+fi;
+if ! is_build_script_done installed; then
+ if [ "x${2}" = "xlibz" ]; then
+ make -j18 DESTDIR=${PREFIX_NATIVE} install;
+ elif [ "x${2}" = "xgzip" ]; then
+ cp gunzip gzip zcat ${PREFIX_NATIVE}/bin;
+ fi;
+ set_build_script_done installed finished;
+fi;
+
+# vim:filetype=sh