diff options
author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:04:44 -0300 |
---|---|---|
committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:04:44 -0300 |
commit | 92787ae0c9bb15c7841d10654ef7a2e595664d99 (patch) | |
tree | 15450b2b4454094fc8571ae4932310a229e7519d /tools | |
parent | 522813da585389c158c6a84e688bc9f53daea38d (diff) |
New upstream version 2.0.14preupstream/2.0.14pre
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/create_debian_source.sh | 77 | ||||
-rwxr-xr-x | tools/create_fedora_source.sh | 39 | ||||
-rw-r--r-- | tools/hardinfo2.spec | 112 |
3 files changed, 208 insertions, 20 deletions
diff --git a/tools/create_debian_source.sh b/tools/create_debian_source.sh index a267d1f9..3c7ae780 100755 --- a/tools/create_debian_source.sh +++ b/tools/create_debian_source.sh @@ -1,38 +1,75 @@ #!/bin/bash -VERSION=2.0.12 +VERSION=$(cat ../CMakeLists.txt |grep set\(HARDINFO2_VERSION|cut -d '"' -f 2) cd .. rm -rf build +sudo apt -y remove hardinfo +sudo apt -y remove hardinfo2 + mkdir build cd build -cmake .. +cmake -DDISTRO=src .. make package_source -tar -xzf hardinfo-$VERSION.tar.gz -cd hardinfo-$VERSION +#rename cpack file +mv hardinfo2-$VERSION.deb hardinfo2-$VERSION.src.deb + +#extract CPack source package +mkdir cpacksrc +dpkg-deb -R hardinfo2-$VERSION.src.deb cpacksrc + +#extract source +tar -xzf hardinfo2-$VERSION.tar.gz +cd hardinfo2-$VERSION debmake -tar -czf ../hardinfo-$VERSION.debian.tar.gz debian +#fixup +cd debian +grep Maintainer ../../cpacksrc/DEBIAN/control >control.fixed +grep -v Homepage control |grep -v Description|grep -v auto-gen|grep -v Section|grep -v debmake |grep -v Maintainer >>control.fixed +echo "Homepage: https://hardinfo2.org">>control.fixed +echo "Description: Hardinfo2 - System Information and Benchmark" >>control.fixed +grep Recommends ../../cpacksrc/DEBIAN/control >>control.fixed +grep Section ../../cpacksrc/DEBIAN/control >>control.fixed +rm -f control +mv control.fixed control cd .. -mv hardinfo-$VERSION.tar.gz hardinfo-$VERSION.orig.tar.gz +#create debian tar.gz +tar -czf ../hardinfo2-$VERSION.debian.tar.gz debian +cd .. +#rename cpack file +mv hardinfo2-$VERSION.tar.gz hardinfo2-$VERSION.orig.tar.gz + +#create dsc echo "Format: 3.0 (quilt) -Source: hardinfo -Binary: hardinfo +Source: hardinfo2 +Binary: hardinfo2 Architecture: any -Version: $VERSION -Maintainer: hwspeedy <hardinfo2@bigbear.dk> -Homepage: https://hardinfo2.org +Version: $VERSION">./hardinfo2-$VERSION.dsc +grep Maintainer ./cpacksrc/DEBIAN/control >>./hardinfo2-$VERSION.dsc +echo "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 +Build-Depends: cmake, debhelper (>= 11) Package-List: - hardinfo deb x11 optional arch=any -Checksums-Sha1:" >./hardinfo-$VERSION.dsc -sha1sum hardinfo-$VERSION.*.tar.gz >>./hardinfo-$VERSION.dsc + hardinfo2 deb x11 optional arch=any +Checksums-Sha1:" >./hardinfo2-$VERSION.dsc +sha1sum hardinfo2-$VERSION.*.tar.gz >>./hardinfo2-$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 +sha256sum hardinfo2-$VERSION.*.tar.gz >>./hardinfo2-$VERSION.dsc +echo "Files:">>./hardinfo2-$VERSION.dsc +md5sum hardinfo2-$VERSION.*.tar.gz >>./hardinfo2-$VERSION.dsc echo "Debian Source Package Files ready in build:" -ls -l hardinfo-$VERSION.*.tar.gz -ls -l hardinfo-$VERSION.dsc +ls -l hardinfo2-$VERSION.src.deb +ls -l hardinfo2-$VERSION.*.tar.gz +ls -l hardinfo2-$VERSION.dsc + +#build from source +sudo apt install debhelper +cd hardinfo2-$VERSION +debuild -b -uc -us + +#test package +ls ../hardinfo_*.deb +sudo apt -y install ../hardinfo2_*.deb +apt info hardinfo2 diff --git a/tools/create_fedora_source.sh b/tools/create_fedora_source.sh new file mode 100755 index 00000000..6dc1f860 --- /dev/null +++ b/tools/create_fedora_source.sh @@ -0,0 +1,39 @@ +#!/bin/bash +VERSION=$(cat ../CMakeLists.txt |grep set\(HARDINFO2_VERSION|cut -d '"' -f 2) +ARCH=$(uname -m) +DIST=$(uname -r|cut -d '.' -f 4) + +#clean and prep +yum -y install ninja-build +cd .. +rm -rf build +sudo yum -y remove hardinfo2 +rm -rf ~/rpmbuild + +#build source +mkdir build +cd build +cmake -DDISTRO=src .. +#fix for local build +cat ../tools/hardinfo2.spec |grep -v Patch|sed '/URL:/c\URL: ./'|sed '/Source0:/c\Source0: hardinfo2-%{version}.tar.gz' |sed 's/hardinfo2-release/hardinfo2/g' >./hardinfo2.spec +make package_source + +cp -f ../tools/hardinfo2.spec . + +echo "Fedora Source Package Files ready in build:" +ls -l hardinfo2-$VERSION*.src.rpm +ls -l hardinfo2.spec + +sleep 3 + +#install src package +sudo rpm --nomd5 -i ./hardinfo2-$VERSION-1.$DIST.src.rpm + +#create package from srpm +cd ~/rpmbuild/SPECS +rpmbuild -ba hardinfo2.spec + +echo "Fedora binary build from Source Package Files ready:" +ls -l ~/rpmbuild/RPMS/$ARCH/* +sudo yum -y install ~/rpmbuild/RPMS/$ARCH/hardinfo2-$VERSION* +yum info hardinfo2 diff --git a/tools/hardinfo2.spec b/tools/hardinfo2.spec new file mode 100644 index 00000000..8f235f64 --- /dev/null +++ b/tools/hardinfo2.spec @@ -0,0 +1,112 @@ +Name: hardinfo2 +Version: 2.0.12 +Release: %autorelease +Summary: System Information and Benchmark for Linux Systems + +# most of the source code is GPL-2.0-or-later license, except: +# includes/blowfish.h - LGPL-2.1-or-later +# includes/loadgraph.h - LGPL-2.0-only +# deps/uber-graph/g-ring.c: LGPL-2.1-or-later +# deps/uber-graph/g-ring.h: LGPL-2.1-or-later +# deps/uber-graph/uber-graph.c: GPL-3.0-or-later +# deps/uber-graph/uber-graph.h: GPL-3.0-or-later +# deps/uber-graph/uber-heat-map.c: GPL-3.0-or-later +# deps/uber-graph/uber-heat-map.h: GPL-3.0-or-later +# deps/uber-graph/uber-label.c: GPL-3.0-or-later +# deps/uber-graph/uber-label.h: GPL-3.0-or-later +# deps/uber-graph/uber-line-graph.c: GPL-3.0-or-later +# deps/uber-graph/uber-line-graph.h: GPL-3.0-or-later +# deps/uber-graph/uber-range.c: GPL-3.0-or-later +# deps/uber-graph/uber-range.h: GPL-3.0-or-later +# deps/uber-graph/uber-scale.c: GPL-3.0-or-later +# deps/uber-graph/uber-scale.h: GPL-3.0-or-later +# deps/uber-graph/uber-scatter.c: GPL-3.0-or-later +# deps/uber-graph/uber-scatter.h: GPL-3.0-or-later +# deps/uber-graph/uber-window.c: GPL-3.0-or-later +# deps/uber-graph/uber-window.h: GPL-3.0-or-later +# deps/uber-graph/uber.h: GPL-3.0-or-later +# modules/benchmark/blowfish.c - LGPL-2.1-or-later +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-only AND GPL-3.0-or-later +URL: https://github.com/hardinfo2/hardinfo2 +Source0: %{url}/archive/release-%{version}/hardinfo2-release-%{version}.tar.gz + +Patch0: https://github.com/hardinfo2/hardinfo2/pull/14.patch + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: ninja-build + +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(cairo-png) +BuildRequires: pkgconfig(gthread-2.0) +BuildRequires: pkgconfig(gmodule-export-2.0) +# BuildRequires: pkgconfig(libsoup-3.0) +BuildRequires: pkgconfig(libsoup-2.4) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(x11) + +BuildRequires: desktop-file-utils + +Obsoletes: hardinfo + +Recommends: lm_sensors +Recommends: sysbench +Recommends: lsscsi +Recommends: glx-utils +Recommends: dmidecode +Recommends: udisks2 +Recommends: xdg-utils +Recommends: iperf3 + +%description +Hardinfo2 is based on hardinfo, which have not been released >10 years. +Hardinfo2 is the reboot that was needed. + +Hardinfo2 offers System Information and Benchmark for Linux Systems. It is able +to obtain information from both hardware and basic software. It can benchmark +your system and compare to other machines online. + +Features include: +- Report generation (in either HTML or plain text) +- Online Benchmarking - compare your machine against other machines + +%prep +%autosetup -p1 -n hardinfo2-release-%{version} + +%build +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + +%cmake_build + +%install +%cmake_install + +%find_lang %{name} + +%check +desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop + +%files -f %{name}.lang +%license +%doc README.md +%{_bindir}/hardinfo2 +%dir %{_libdir}/hardinfo2 +%dir %{_libdir}/hardinfo2/modules +%{_libdir}/hardinfo2/modules/benchmark.so +%{_libdir}/hardinfo2/modules/computer.so +%{_libdir}/hardinfo2/modules/devices.so +%{_libdir}/hardinfo2/modules/network.so +%{_datadir}/applications/hardinfo2.desktop +%{_datadir}/hardinfo2/*.ids +%{_datadir}/hardinfo2/benchmark.data +%{_datadir}/hardinfo2/*.json +%{_datadir}/hardinfo2/pixmaps/ +%{_datadir}/icons/hicolor/256x256/apps/hardinfo2.png +%{_mandir}/man1/hardinfo2.1* + +%changelog +%autochangelog |