From c1e7692617b954716ad33b82087112b3527c2f08 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 5 Aug 2019 13:41:59 +0100 Subject: [PATCH] Revert to path mapping, but try a symlink this time --- build | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build b/build index d200da2..66b1cb9 100755 --- a/build +++ b/build @@ -52,6 +52,7 @@ task_setup() { check_command msbuild true; check_command nuget true; check_command fpm true; + check_command dpkg true; check_command awk true; task_end 0; @@ -72,23 +73,20 @@ task_build() { } task_package() { - task_begin "Preparing for packaging"; - tmp_dir="./deb_package"; - mkdir -p "${tmp_dir}/usr/lib/polyfeed"; - mkdir -p "${tmp_dir}/usr/bin"; - cp -ral PolyFeed/bin/Release/* /usr/lib/polyfeed; - cp -al polyfeed "${tmp_dir}/usr/bin"; - task_end $?; - task_begin "Packaging as .deb"; + execute ln -s Release PolyFeed/bin/polyfeed; version="$(awk '/version = / { print($3) }' PolyFeed.sln | tr -d '\n\r')-$(date +"%Y-%m-%dT%H:%M")+$(git rev-parse HEAD | head -c7)"; fpm -s dir -t deb -n polyfeed -v "${version}" --license MPL-2.0 \ --architecture all --maintainer "Starbeamrainbowlabs " \ --description "Create Atom feeds for websites that don't support it" \ --url "https://github.com/sbrl/PolyFeed" \ --depends mono-runtime \ - "${tmp_dir}"; + PolyFeed/bin/polyfeed=/usr/lib \ + polyfeed=/usr/bin; + execute rm PolyFeed/bin/polyfeed; + execute dpkg -c *.deb; # We don't know it's name :P task_end $?; + } task_archive() {