diff options
author | hwspeedy <ns@bigbear.dk> | 2024-03-03 05:33:32 +0100 |
---|---|---|
committer | hwspeedy <ns@bigbear.dk> | 2024-03-03 05:33:32 +0100 |
commit | 1ababda27ac03e3b9ad8aeb824658936df68d8c5 (patch) | |
tree | 69fc30e793bcc19a22b3b10c44da1afd60d23193 | |
parent | 037600fd451ac42462754b55a6f519e407ba8b99 (diff) |
PACKAGING - debian/redhat source package fixing - add script to create debian source packagerelease-2.0.12
tools/create_debian_source.sh
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rwxr-xr-x | tools/create_debian_source.sh | 38 |
2 files changed, 48 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee5c461..28182192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,11 @@ else() endif() #Put it together string(REPLACE " " "_" CPACK_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") +if(${RPM}) + string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${HARDINFO2_VERSION}.src") +else() + string(REPLACE " " "_" CPACK_SOURCE_PACKAGE_FILE_NAME "hardinfo-${HARDINFO2_VERSION}") +endif() message("-- Found Package Target ${CPACK_PACKAGE_FILE_NAME}") message("-- Found Package Version ${CPACK_PACKAGE_VERSION}") @@ -522,11 +527,16 @@ install(FILES pixmaps/hardinfo2.png #Please update here for building packages #keep package name as hardinfo to allow for upgrading in distro SET(CPACK_PACKAGE_NAME "hardinfo") +SET(CPACK_SOURCE_PACKAGE_NAME "hardinfo") SET(CPACK_PACKAGE_HOMEPAGE_URL "https://www.hardinfo2.org") if(${RPM}) + SET(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;/.github/;.gitignore;.gitmodules;*.po.old;*~;*.mo;*.dsc;/debian/") + SET(CPACK_SOURCE_GENERATOR "RPM") SET(CPACK_GENERATOR "RPM") SET(PACKAGE_GTK2 "libgtk-2-0") else() + SET(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;/.github/;.gitignore;.gitmodules;*.po.old;*~;*.mo") + SET(CPACK_SOURCE_GENERATOR "TGZ") SET(CPACK_GENERATOR "DEB") SET(PACKAGE_GTK2 "libgtk2.0-0") endif() diff --git a/tools/create_debian_source.sh b/tools/create_debian_source.sh new file mode 100755 index 00000000..a267d1f9 --- /dev/null +++ b/tools/create_debian_source.sh @@ -0,0 +1,38 @@ +#!/bin/bash +VERSION=2.0.12 +cd .. +rm -rf build +mkdir build +cd build +cmake .. +make package_source +tar -xzf hardinfo-$VERSION.tar.gz +cd hardinfo-$VERSION +debmake +tar -czf ../hardinfo-$VERSION.debian.tar.gz debian +cd .. +mv hardinfo-$VERSION.tar.gz hardinfo-$VERSION.orig.tar.gz + +echo "Format: 3.0 (quilt) +Source: hardinfo +Binary: hardinfo +Architecture: any +Version: $VERSION +Maintainer: hwspeedy <hardinfo2@bigbear.dk> +Homepage: https://hardinfo2.org +Standards-Version: 4.1.3 +Vcs-Browser: https://salsa.debian.org/hwspeedy/hardinfo2 +Vcs-Git: https://salsa.debian.org/hwspeedy/hardinfo2.git +Build-Depends: cmake, debhelper (>= 11), libjson-glib-dev, zlib1g-dev, libsoup2.4-dev, libgtk-3-dev +Package-List: + hardinfo deb x11 optional arch=any +Checksums-Sha1:" >./hardinfo-$VERSION.dsc +sha1sum hardinfo-$VERSION.*.tar.gz >>./hardinfo-$VERSION.dsc +echo "Checksums-Sha256:">>./hardinfo-$VERSION.dsc +sha256sum hardinfo-$VERSION.*.tar.gz >>./hardinfo-$VERSION.dsc +echo "Files:">>./hardinfo-$VERSION.dsc +md5sum hardinfo-$VERSION.*.tar.gz >>./hardinfo-$VERSION.dsc + +echo "Debian Source Package Files ready in build:" +ls -l hardinfo-$VERSION.*.tar.gz +ls -l hardinfo-$VERSION.dsc |