diff options
-rw-r--r-- | src/oh-buildopk | 4 | ||||
-rw-r--r-- | src/oh-gencontrol | 10 | ||||
-rw-r--r-- | src/oh-installfiles | 2 | ||||
-rw-r--r-- | src/oh-strip | 2 | ||||
-rw-r--r-- | src/opkbuild | 11 |
5 files changed, 25 insertions, 4 deletions
diff --git a/src/oh-buildopk b/src/oh-buildopk index 03ae59d..37df551 100644 --- a/src/oh-buildopk +++ b/src/oh-buildopk @@ -33,6 +33,8 @@ fi # Iterate over packages. while [ ${#} -gt 0 ]; do + printf 'oh-buildopk: Packing package "%s"...\n' "${1}" + # Write debian-binary. echo '2.0' > debian-binary # Pack data.tar.gz. @@ -45,7 +47,7 @@ while [ ${#} -gt 0 ]; do tar -czf ../control.tar.gz . cd .. # Pack opk file. - tar -czf ../../${1}_$(oh_get_field ${1} Version)_arch.opk \ + tar -czf ../../${1}_$(oh_get_field Version)_arch.opk \ debian-binary data.tar.gz control.tar.gz rm -Rf debian-binary control data.tar.gz control.tar.gz shift diff --git a/src/oh-gencontrol b/src/oh-gencontrol index e0af798..6407eda 100644 --- a/src/oh-gencontrol +++ b/src/oh-gencontrol @@ -28,13 +28,13 @@ print_usage() missing_field() { - printf 'ERROR: Missing field "%s" in control file.\n' "${1}" >&2 + printf 'oh-gencontrol: ERROR: Missing field "%s" in control file.\n' "${1}" >&2 exit 2 } invalid_pkg_name() { - printf 'ERROR: Invalid package name: "%s"\n' "${1}" >&2 + printf 'oh-gencontrol: Error: Invalid package name: "%s"\n' "${1}" >&2 exit 2 } @@ -71,6 +71,9 @@ if ${is_src}; then srcpkg=$(oh_get_field Source) || missing_field Source oh_validate_pkg_name "${srcpkg}" || invalid_pkg_name "${srcpkg}" + printf 'oh-gencontrol: Generating control directory for package "%s"...\n' \ + "${srcpkg}-src" + control_dir="${srcpkg}-src.control" control="${control_dir}/control" @@ -94,6 +97,9 @@ else binpkg="${1}" oh_validate_pkg_name "${binpkg}" || invalid_pkg_name "${binpkg}" + printf 'oh-gencontrol: Generating control directory for package "%s"...\n' \ + "${binpkg}" + control_dir="${binpkg}.control" control="${control_dir}/control" diff --git a/src/oh-installfiles b/src/oh-installfiles index b200d5f..ebd3f38 100644 --- a/src/oh-installfiles +++ b/src/oh-installfiles @@ -37,6 +37,8 @@ IFS=' # Iterate over packages. while [ ${#} -gt 0 ]; do + printf 'oh-installfiles: Installing files for package "%s"...\n' "${1}" + # Loop over lines in the 'install' file. while read -r pattern; do # Ensure that the full directory path of the pattern exists in the diff --git a/src/oh-strip b/src/oh-strip index 9e11f75..a8769d4 100644 --- a/src/oh-strip +++ b/src/oh-strip @@ -65,6 +65,8 @@ fi # Iterate over object files. while [ ${#} -gt 0 ]; do + printf 'oh-strip: Stripping objects in package "%s"...\n' "${1}" + if ${make_dbg_pkg}; then # Copy debugging symbols into a debugging object file and add a GDB link # from the original object file to the debugging object file. diff --git a/src/opkbuild b/src/opkbuild index 1f0317b..2c7e974 100644 --- a/src/opkbuild +++ b/src/opkbuild @@ -27,6 +27,7 @@ print_usage() } # Sanity checks. +printf 'opkbuild: Checking for sanity...\n' if [ ! -f format -o ! -f build -o ! -f control ]; then printf 'Error: Current working directory is not a source package.\n' >&2 exit 1 @@ -36,12 +37,18 @@ if [ "$(cat format)" != '1.0' ]; then exit 1 fi +# Make work area. +printf 'opkbuild: Making work area...\n' mkdir tmp cd tmp -# Build *-src package. +# Get source package name and version. +printf 'opkbuild: Reading source package control fields...\n\n' srcpkg=$(oh_get_field Source) version=$(oh_get_field Version) + +# Build *-src package. +printf 'opkbuild: Installing files for package "%s"...\n' "${srcpkg}-src" mkdir -p ${srcpkg}-src/usr/src/${srcpkg}_${version} for file in ../*; do case ${file} in @@ -55,6 +62,7 @@ done oh-gencontrol -s oh-buildopk ${srcpkg}-src rm -Rf dest +printf 'opkbuild: Package "%s" complete!\n\n' "${srcpkg}-src" # Build other binary packages. for binpkgdir in ../*.pkg/; do @@ -74,6 +82,7 @@ for binpkgdir in ../*.pkg/; do binpkg=${binpkg%'.pkg/'} # Build the package. ../build ${binpkg} + printf 'opkbuild: Package "%s" complete!\n\n' "${binpkg}" # Clean up everything except the build stamps. for file in *; do case ${file} in |