X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0a98952530fb465fa31566fa5e0192bea9fc16e4..3bf898db1a6f0db043060cd601131b17bd6ef82d:/build/run-library.sh diff --git a/build/run-library.sh b/build/run-library.sh index 58a177ec60..4495a4e57b 100755 --- a/build/run-library.sh +++ b/build/run-library.sh @@ -100,7 +100,18 @@ package_go_binary() { cd $WORKSPACE/packages/$TARGET go get "git.curoverse.com/arvados.git/$src_path" - fpm_build "$GOPATH/bin/$basename=/usr/bin/$prog" "$prog" 'Curoverse, Inc.' dir "$version" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=$description" "$WORKSPACE/$license_file=/usr/share/doc/$prog/$license_file" + + declare -a switches=() + systemd_unit="$WORKSPACE/${src_path}/${prog}.service" + if [[ -e "${systemd_unit}" ]]; then + switches+=( + --after-install "${WORKSPACE}/build/go-package-scripts/postinst" + --before-remove "${WORKSPACE}/build/go-package-scripts/prerm" + "${systemd_unit}=/lib/systemd/system/${prog}.service") + fi + switches+=("$WORKSPACE/${license_file}=/usr/share/doc/$prog/${license_file}") + + fpm_build "$GOPATH/bin/${basename}=/usr/bin/${prog}" "${prog}" 'Curoverse, Inc.' dir "${version}" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=${description}" "${switches[@]}" } default_iteration() { @@ -148,8 +159,7 @@ handle_rails_package() { local -a pos_args=("$srcdir/=$railsdir" "$pkgname" "Curoverse, Inc." dir "$(cat "$version_file")") local license_arg="$license_path=$railsdir/$(basename "$license_path")" - # --iteration=5 accommodates the package script bugfixes #8371 and #8413. - local -a switches=(--iteration=5 + local -a switches=(--iteration=6 --after-install "$scripts_dir/postinst" --before-remove "$scripts_dir/prerm" --after-remove "$scripts_dir/postrm")