Compare commits

..

No commits in common. "c48987be89adc6280ae4298df6fcabcc3b6bea2e" and "6c1b8792dae25a833a53fadd2df37931d2338ebf" have entirely different histories.

3 changed files with 11 additions and 31 deletions

@ -1 +1 @@
Subproject commit 985c0e7a06c90a380f76825f6aedbcf2648629f7 Subproject commit 9aedecc62e9585ba1d9b88efe083b52105e0947f

View file

@ -2,7 +2,7 @@
pkgname="remark42" pkgname="remark42"
pkgver=1.12.0 pkgver=1.12.0
pkgrel=2 pkgrel=1
arch="amd64" arch="amd64"
pkgcommit="" pkgcommit=""
section="utils" section="utils"
@ -29,6 +29,6 @@ function package {
function debian_postinst { function debian_postinst {
cat << EOF cat << EOF
touch /etc/default/remark42 touch /etc/default/remark42
useradd --system remark42 useradd --systemd remark42
EOF EOF
} }

View file

@ -135,45 +135,25 @@ for package in "${_PACKGES_TO_BUILD[@]}" ; do
msg_info "Start for $package" msg_info "Start for $package"
cd "$package" cd "$package"
function retrieve_source { "$MAKEDEB_PATH" --nobuild "${MAKEDEB_ARGS[@]}" && ret=$? || ret=$?
"$MAKEDEB_PATH" --nobuild "${MAKEDEB_ARGS[@]}" && ret=$? || ret=$? if [[ $ret -ne 0 ]] ; then
if [[ $ret -ne 0 ]] ; then msg_warn "Error occurred when running makedeb, skip this package"
msg_warn "Error occurred when running makedeb, skip this package" exit 4
exit 4 fi
fi
}
function is_dynamic_pkgver {
"$MAKEDEB_PATH" --is-dynamic-pkgver "${MAKEDEB_ARGS[@]}"
}
package_name="" package_name="$("$MAKEDEB_PATH" --packagelist "${MAKEDEB_ARGS[@]}")"
source_ready=0
if [[ -n "${PACKAGE_EXISTS_HOOK}" ]] ; then if [[ -n "${PACKAGE_EXISTS_HOOK}" ]] ; then
if is_dynamic_pkgver ; then ret=0
retrieve_source
source_ready=1
fi
package_name="$("$MAKEDEB_PATH" --packagelist "${MAKEDEB_ARGS[@]}")"
msg_info "Checking if package $package_name exists..." msg_info "Checking if package $package_name exists..."
run_hook "$PACKAGE_EXISTS_HOOK" "{}" "$package_name" log_exe_str || ret="$?"
run_hook "$PACKAGE_EXISTS_HOOK" "{}" "$package_name" log_exe_str && ret="$?" || ret="$?"
if [[ $ret -eq 0 ]] ; then if [[ $ret -eq 0 ]] ; then
msg_info "Package ${package_name} already built, skip" msg_info "Package ${package_name} already built, skip"
exit 0 exit 0
fi fi
fi fi
if (( ! source_ready )) ; then
retrieve_source
fi
if [[ -z "$package_name" ]] ; then
package_name="$("$MAKEDEB_PATH" --packagelist "${MAKEDEB_ARGS[@]}")"
fi
msg_info "Start building..." msg_info "Start building..."
"$MAKEDEB_PATH" --noextract "${MAKEDEB_ARGS[@]}" && ret=$? || ret=$? "$MAKEDEB_PATH" --noextract "${MAKEDEB_ARGS[@]}" && ret=$? || ret=$?