diff --git a/.gitignore b/.gitignore index d2a2da19d..9eaede018 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ cscope.* tags fastfetch.kdev4 +**/*.deb +packaging/deb/fastfetch diff --git a/packaging/deb/control-template b/packaging/deb/control-template new file mode 100644 index 000000000..c0a92a103 --- /dev/null +++ b/packaging/deb/control-template @@ -0,0 +1,13 @@ +Package: fastfetch +Version: +Section: utils +Priority: extra +Architecture: amd64 +Maintainer: peter@bohner.me +Homepage: https://github.com/LinusDierheimer/fastfetch +Installed-Size: 410K +Description: A fast alternative to neofetch + fastfetch is a neofetch-like tool for fetching system information and + displaying them in a pretty way. It is written in c to achieve much better + performance, in return only Linux and Android are supported. It also uses + mechanisms like multithreading and caching to finish as fast as possible. diff --git a/packaging/deb/create-deb-pkg.sh b/packaging/deb/create-deb-pkg.sh new file mode 100755 index 000000000..8a6121794 --- /dev/null +++ b/packaging/deb/create-deb-pkg.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +cd "$(dirname "$0")" || exit +echo "cleanup" +rm -rf ./build ./fastfetch fastfetch.deb + +echo "building fastfetch" +mkdir build +cd build || exit +cmake ../../.. +cmake --build . --target fastfetch "-j$(nproc)" + +echo "generating package contents" +# deb versions must start with a number, hence the 1 added before the rXXX +version="0:1$(./fastfetch --version | cut -d ' ' -f2)-0" +echo "Using package version: $version" +cd .. + +mkdir -p fastfetch/DEBIAN +sed "s//$version/g" control-template > fastfetch/DEBIAN/control + +mkdir -p fastfetch/usr/bin +cp build/fastfetch fastfetch/usr/bin/ +mkdir -p fastfetch/usr/share/bash-completion/completions +cp ../../completions/bash fastfetch/usr/share/bash-completion/completions/fastfetch +mkdir -p fastfetch/usr/share/fastfetch/ +cp -r ../../presets fastfetch/usr/share/fastfetch/ + +echo "building package" +dpkg-deb --build fastfetch +echo "package built." +echo "cleaning up" +rm -rf build fastfetch