diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index db48b79..787451e 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -21,18 +21,17 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - fetch-depth: 0 # Fetch all history for all branches and tags + fetch-depth: 0 # Fetch full Git history and tags - name: Set up the build environment run: | sudo apt-get update sudo apt-get install -y build-essential autoconf automake libtool \ - libgtk-3-dev libglib2.0-dev gettext desktop-file-utils devscripts fakeroot lintian autopoint dh-make + libgtk-3-dev libglib2.0-dev gettext desktop-file-utils devscripts fakeroot lintian autopoint dh-make dh-autoreconf - name: Determine version and dist id: version run: | - # Get the most recent tag, and check if the latest commit is tagged LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0") TAGGED_COMMIT=$(git describe --tags --exact-match 2>/dev/null || echo "notag") @@ -47,15 +46,32 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV echo "DIST=$DIST" >> $GITHUB_ENV - - name: Prepare Debian Packaging + - name: Generate Debian Packaging Files run: | - # Initialize debian directory structure with the correct version if it doesn't exist if [ ! -d "debian" ]; then dh_make --createorig -y --single --native --packagename xnec2c_$VERSION - fi + echo -e '#!/usr/bin/make -f\n%:\n\tdh $@' > debian/rules + chmod +x debian/rules + echo "9" > debian/compat + echo "xnec2c ($VERSION) unstable; urgency=low\n\n * Initial release.\n\n -- Your Name $(date -R)" > debian/changelog + cat > debian/control < +Build-Depends: debhelper (>= 9), autotools-dev, automake, autoconf, libtool, libgtk-3-dev, libglib2.0-dev, gettext, desktop-file-utils +Standards-Version: 3.9.6 +Homepage: https://www.example.com - # Ensure the debian/rules file exists and is executable - chmod +x debian/rules +Package: xnec2c +Architecture: any +Depends: \${shlibs:Depends}, \${misc:Depends} +Description: A multi-threaded EM tool to model antenna near- and far-field radiation patterns. + Xnec2c is a high-performance multi-threaded electromagnetic simulation + package to model antenna near- and far-field radiation patterns for + Linux and UNIX operating systems. +EOL + fi - name: Build the DEB package using debuild run: | @@ -66,8 +82,8 @@ jobs: - name: Test DEB package run: | - dpkg -i ../xnec2c_*.deb || true # Install DEB package - xnec2c -h # Run test + dpkg -i ../xnec2c_*.deb || true + xnec2c -h - name: Upload the DEB package uses: actions/upload-artifact@v2