Skip to content

Commit f087d81

Browse files
committed
workflow: merge both terminal and GUI app into a single debian package (too)
1 parent 45c1e8f commit f087d81

File tree

4 files changed

+17
-58
lines changed

4 files changed

+17
-58
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: make DEBUG=0 GUI_APP=0 CXX=x86_64-linux-gnu-g++-11
3939

4040
- name: Install to ./usr
41-
run: mkdir -p ./usr && make install DESTDIR=. PREFIX=/usr
41+
run: mkdir -p ./usr && make install DEBUG=0 DESTDIR=$(pwd) PREFIX=/usr
4242

4343
- name: Compile (GUI app)
4444
run: make clean && make DEBUG=0 GUI_APP=1 CXX=x86_64-linux-gnu-g++-11
@@ -47,10 +47,10 @@ jobs:
4747
run: |
4848
install ./build/release/customfetch-gui -Dm 755 -v ./usr/bin/
4949
mkdir -p ./usr/share/applications
50-
cp -f customfetch.desktop ./usr/share/applications/
50+
install -Dm644 customfetch.desktop ./usr/share/applications/
5151
5252
- name: Make Release
53-
run: tar -zcf ./customfetch.tar.gz ./usr/
53+
run: tar -zcf ./customfetch.tar.gz usr/
5454

5555
- name: Upload to github artifacts
5656
uses: actions/upload-artifact@v4
@@ -85,7 +85,7 @@ jobs:
8585
mkdir -p Debian/Debhelper/Buildsystem/
8686
wget https://github.com/Debian/debhelper/raw/master/lib/Debian/Debhelper/Buildsystem/makefile.pm -O Debian/Debhelper/Buildsystem/make.pm
8787
sed -i "s#package Debian::Debhelper::Buildsystem::makefile#package Debian::Debhelper::Buildsystem::make#g" Debian/Debhelper/Buildsystem/make.pm
88-
sed -i "s#DEBUG=0#DEBUG=0 CXX=x86_64-linux-gnu-g++-11#g" debian/rules
88+
sed -i "s#DEBUG=#CXX=x86_64-linux-gnu-g++-11 DEBUG=#g" debian/rules
8989
dpkg-buildpackage -us -uc
9090
mv ../customfetch_2.0.0-beta1_amd64.deb ../customfetch_amd64.deb
9191
@@ -95,44 +95,6 @@ jobs:
9595
name: customfetch-deb-pkg
9696
path: /tmp/customfetch-2.0.0-beta1.orig/customfetch_amd64.deb
9797

98-
build-deb-gui:
99-
runs-on: ubuntu-22.04
100-
permissions:
101-
contents: read
102-
103-
steps:
104-
- uses: actions/checkout@v4
105-
106-
- name: create tmp directory
107-
run: mkdir /tmp/customfetch-2.0.0-beta1.orig
108-
109-
- name: Install Packages
110-
run: |
111-
sudo apt-get update && sudo apt-get upgrade -y
112-
sudo apt-get install libwayland-dev g++-11 libgtk-3-dev pkg-config libgtkmm-3.0-dev libdconf-dev libglib2.0-dev libarchive-tools
113-
sudo apt-get install binutils lintian debhelper gettext devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
114-
115-
- name: Clean
116-
run: make distclean
117-
118-
- name: Create deb
119-
run: |
120-
cp -r $GITHUB_WORKSPACE /tmp/customfetch-2.0.0-beta1.orig
121-
cd /tmp/customfetch-2.0.0-beta1.orig/customfetch
122-
mkdir -p Debian/Debhelper/Buildsystem/
123-
wget https://github.com/Debian/debhelper/raw/master/lib/Debian/Debhelper/Buildsystem/makefile.pm -O Debian/Debhelper/Buildsystem/make.pm
124-
sed -i "s#package Debian::Debhelper::Buildsystem::makefile#package Debian::Debhelper::Buildsystem::make#g" Debian/Debhelper/Buildsystem/make.pm
125-
sed -i "s#GUI_APP=0#GUI_APP=1 CXX=x86_64-linux-gnu-g++-11#g" debian/rules
126-
sed -i "/^Build-Depends:/a Depends: libgtkmm-3.0-1v5,libgtk-3-0" debian/control
127-
dpkg-buildpackage -us -uc
128-
mv ../customfetch_2.0.0-beta1_amd64.deb ../customfetch-gui_amd64.deb
129-
130-
- name: Upload to github artifacts
131-
uses: actions/upload-artifact@v4
132-
with:
133-
name: customfetch-gui-deb-pkg
134-
path: /tmp/customfetch-2.0.0-beta1.orig/customfetch-gui_amd64.deb
135-
13698
build-macos-tar:
13799
runs-on: macos-latest
138100
permissions:
@@ -179,7 +141,7 @@ jobs:
179141

180142
release:
181143
name: Create GitHub Release
182-
needs: [build-linux-tar, build-macos-tar, build-deb-gui, build-deb, get-version]
144+
needs: [build-linux-tar, build-macos-tar, build-deb, get-version]
183145
runs-on: ubuntu-latest
184146
permissions:
185147
contents: write
@@ -235,12 +197,3 @@ jobs:
235197
asset_path: customfetch-deb-pkg/customfetch_amd64.deb
236198
asset_name: customfetch_${{ needs.get-version.outputs.version }}_amd64.deb
237199
asset_content_type: application/vnd.debian.binary-package
238-
239-
- uses: actions/upload-release-asset@v1
240-
env:
241-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
242-
with:
243-
upload_url: ${{ needs.release.outputs.release-url }}
244-
asset_path: customfetch-gui-deb-pkg/customfetch-gui_amd64.deb
245-
asset_name: customfetch-gui_${{ needs.get-version.outputs.version }}_amd64.deb
246-
asset_content_type: application/vnd.debian.binary-package

cufetchpm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ NAME = cufetchpm
2626
TARGET ?= $(NAME)
2727
OLDVERSION = 0.0.0
2828
VERSION = 0.0.1
29-
SRC = $(wildcard src/*.cpp src/manager/*.cpp ../src/util.cpp)
29+
SRC = $(wildcard src/*.cpp ../src/util.cpp)
3030
OBJ = $(SRC:.cpp=.o)
3131
LDLIBS += $(BUILDDIR)/libfmt.a $(BUILDDIR)/libtiny-process-library.a
3232
CXXFLAGS ?= -mtune=generic -march=native

debian/control

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Source: customfetch
22
Section: utils
33
Priority: optional
4-
Maintainer: toni500 <toni500minecraft@gmail.com>
4+
Maintainer: toni500 <tonino512@linuxmail.org>
55
Build-Depends: pkg-config,libgtkmm-3.0-dev,libwayland-dev,libdconf-dev,libglib2.0-dev
66
Standards-Version: 4.5.1
77
Homepage: https://github.com/Toni500github/customfetch
88

99
Package: customfetch
1010
Architecture: any
11-
Depends: ${shlibs:Depends}, ${misc:Depends}
11+
Depends: ${shlibs:Depends}, ${misc:Depends}, libgtkmm-3.0-1v5, libgtk-3-0
1212
Suggests: libwayland-client0,libdconf1,libglib2.0-0
13-
Description: Highly customizable and fast information fetcher program
14-
Inspired by neofetch and fastfetch
13+
Description: A modular information fetching (neofetch-like) tool.
14+
Which its focus point is the performance and customizability.

debian/rules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ export DH_VERBOSE = 1
1919

2020
override_dh_auto_build:
2121
dh_auto_build -- all DEBUG=0 GUI_APP=0
22+
cp -f build/release/customfetch customfetch-terminal
23+
24+
# Clean and build GUI version
25+
$(MAKE) clean
26+
dh_auto_build -- all DEBUG=0 GUI_APP=1
2227

2328
override_dh_auto_install:
24-
dh_auto_install -- all DEBUG=0 GUI_APP=0
29+
dh_auto_install -- all DEBUG=0 GUI_APP=1
30+
install -Dm755 customfetch-terminal debian/customfetch/usr/bin/customfetch
2531

2632
# dh_make generated override targets
2733
# This is example for Cmake (See https://bugs.debian.org/641051 )

0 commit comments

Comments
 (0)