Skip to content

Commit 772f0f7

Browse files
gatopeichgatopeich
authored andcommitted
Add PKGBUILD and info for Archlinux
1 parent 923ec08 commit 772f0f7

File tree

4 files changed

+56
-14
lines changed

4 files changed

+56
-14
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,14 @@ jobs:
3333
with:
3434
name: Debian packages
3535
path: '*.deb'
36+
37+
- name: Publish AUR package
38+
uses: KSXGitHub/[email protected]
39+
with:
40+
pkgname: gatotray
41+
pkgbuild: ./PKGBUILD
42+
commit_username: gatopeich
43+
commit_email: ${{ secrets.AUR_EMAIL }}
44+
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
45+
ssh_keyscan_types: rsa,ecdsa,ed25519
46+
test: true

Debian-Control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: gatotray
2-
Version: 4.0
2+
Version: 4.1.20250228
33
Section: Accessories
44
Priority: optional
55
Architecture: all
@@ -9,7 +9,7 @@ Pre-Depends:
99
Recommends: xterm | procps | acpid
1010
Suggests:
1111
Installed-Size: 25
12-
Maintainer: gatopeich <[email protected]>
12+
Maintainer: gatopeich <[email protected]>
1313
Conflicts:
1414
Replaces:
1515
Provides: gatotray

Makefile

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
# V2.1: Added CCby license. Restructured a bit.
1515
# V2.0: Added 32-bit target for 64 bits environment.
1616

17-
VERSION := 4.1.$(shell date +%Y.%m.%d)
18-
CFLAGS := -std=c11 -Wall -O2 -DNDEBUG -g2 -DVERSION=\"$(VERSION)\" $(CFLAGS) -Wno-deprecated-declarations
17+
VERSION := 4.1
18+
REL := $(shell git log -1 --format=%cd --date=format:%Y%m%d || date +%Y%m%d)
19+
CFLAGS := -std=c11 -Wall -O2 -DNDEBUG -g2 -DVERSION=\"$(VERSION).$(REL)\" $(CFLAGS) -Wno-deprecated-declarations
1920
CPPFLAGS := `pkg-config --cflags gtk+-2.0` $(CPPFLAGS)
2021
LDLIBS := `pkg-config --libs gtk+-2.0` $(LDLIBS)
2122

23+
$(warn $(DESTDIR))
24+
2225
targets := gatotray
2326

2427
all: $(targets)
@@ -28,14 +31,13 @@ gatotray: gatotray.o
2831
gatotray.i386: gatotray.o.i386
2932
$(LD) -m32 -o $@ $^ $(LDLIBS)
3033

31-
install: gatotray
32-
strip $^
33-
install -vD $^ /usr/local/bin
34-
install -vD gatotray.xpm /usr/share/icons
35-
install -vD gatotray.desktop /usr/share/applications/gatotray.desktop
34+
install: gatotray gatotray.xpm gatotray.desktop
35+
install -svDt $(DESTDIR)/usr/bin/ gatotray
36+
install -vDt $(DESTDIR)/usr/share/icons/ gatotray.xpm
37+
install -vDt $(DESTDIR)/usr/share/applications/ gatotray.desktop
3638

37-
deb: gatotray-$(VERSION).deb
38-
gatotray-$(VERSION).deb: gatotray gatotray.xpm gatotray.desktop Debian-Control
39+
deb: gatotray-$(VERSION).$(REL).deb
40+
gatotray-$(VERSION).$(REL).deb: gatotray gatotray.xpm gatotray.desktop Debian-Control
3941
install -vD gatotray root/usr/bin/gatotray
4042
strip root/usr/bin/gatotray
4143
install -vD gatotray.desktop root/usr/share/applications/gatotray.desktop
@@ -45,9 +47,17 @@ gatotray-$(VERSION).deb: gatotray gatotray.xpm gatotray.desktop Debian-Control
4547
sed -i 's/^Version:.*/Version: $(VERSION)/' root/DEBIAN/control
4648
dpkg -b root $@
4749

48-
# Additional: .api file for SciTE users...
49-
.api: $(wildcard *.h)
50-
$(CC) -E $(CPPFLAGS) $^ |grep '('|sed 's/^[^[:space:]]*[[:space:]]\+//'|sort|uniq > $@
50+
Debian-Control: Makefile
51+
sed -ie 's/^Version:.*/Version: $(VERSION).$(REL)/' $@
52+
53+
PKGBUILD: Makefile
54+
sed -ie 's/^pkgver=.*/pkgver=$(VERSION)/' $@
55+
sed -ie 's/^pkgrel=.*/pkgrel=$(REL)/' $@
56+
57+
# Tarball for building distribution packages
58+
tarball: gatotray-$(VERSION).$(REL).tar.gz
59+
gatotray-$(VERSION).$(REL).tar.gz: Debian-Control PKGBUILD
60+
git archive --prefix=gatotray-$(VERSION)/ -o $@ HEAD
5161

5262

5363
### Magic rules follow

PKGBUILD

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Maintainer: gatopeich <[email protected]>
2+
pkgname=gatotray
3+
pkgver=4.1
4+
pkgrel=20250228
5+
pkgdesc="A lightweight graphical system monitor for the desktop tray"
6+
arch=('any')
7+
url="https://github.com/gatopeich/gatotray"
8+
license=('CC-BY')
9+
depends=('gtk2')
10+
source=("https://github.com/gatopeich/gatotray/archive/refs/tags/v$pkgver.$pkgrel.tar.gz")
11+
sha256sums=('SKIP')
12+
13+
build() {
14+
cd "$srcdir/$pkgname-$pkgver"
15+
make
16+
}
17+
18+
package() {
19+
cd "$srcdir/$pkgname-$pkgver"
20+
make DESTDIR="$pkgdir" install
21+
}

0 commit comments

Comments
 (0)