Skip to content

Commit

Permalink
batsignal: update to 1.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
motorto committed Jul 25, 2022
1 parent 751e1ae commit de6f766
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 4 deletions.
75 changes: 75 additions & 0 deletions srcpkgs/batsignal/patches/makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From cb1a6ad9a2d17ae908e94a87ff8e6fa24c2f0ceb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= <acerqueira021@gmail.com>
Date: Mon, 25 Jul 2022 08:49:39 +0100
Subject: [PATCH 1/1] b

---
Makefile | 36 +++++++++++-------------------------
1 file changed, 11 insertions(+), 25 deletions(-)

diff --git a/Makefile b/Makefile
index a50c609..9d5b712 100644
--- a/Makefile
+++ b/Makefile
@@ -3,47 +3,33 @@
NAME = batsignal
VERSION != grep VERSION version.h | cut -d \" -f2

-CC = cc
-RM = rm -f
-INSTALL = install
-SED = sed
-
PREFIX = /usr/local

-MANPREFIX.$(PREFIX)=$(PREFIX)/share/man
-MANPREFIX./usr/local=/usr/local/man
-MANPREFIX.=/usr/share/man
-MANPREFIX=$(MANPREFIX.$(PREFIX))
-
-INCLUDES != pkg-config --cflags libnotify
-CFLAGS_EXTRA = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os
-CFLAGS := $(CFLAGS_EXTRA) -std=c11 $(INCLUDES)
+MANPREFIX = $(PREFIX)/share/man

-LIBS != pkg-config --libs libnotify
-LIBS := $(LIBS) -lm
-LDFLAGS_EXTRA = -s
-LDFLAGS := $(LIBS) $(LDFLAGS_EXTRA)
+CFLAGS_EXTRA = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os -s
+CFLAGS := $(CFLAGS_EXTRA) $(CFLAGS) -std=c99 $(shell pkg-config --cflags libnotify)
+LDFLAGS := $(LDFLAGS) -lm $(shell pkg-config --libs libnotify)

all: $(NAME) $(NAME).1

$(NAME).o: version.h

$(NAME): $(NAME).o
- $(CC) -o $(NAME) $(NAME).o $(LDFLAGS)

$(NAME).1: $(NAME).1.in version.h
- $(SED) "s/VERSION/$(VERSION)/g" < $(NAME).1.in > $@
+ sed "s/VERSION/$(VERSION)/g" < $(NAME).1.in > $@

install: all
@echo Installing in $(DESTDIR)$(PREFIX)
- $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
- $(INSTALL) -d $(DESTDIR)$(MANPREFIX)/man1
- $(INSTALL) -m 0755 $(NAME) $(DESTDIR)$(PREFIX)/bin/
- $(INSTALL) -m 0644 $(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/
+ install -d $(DESTDIR)$(PREFIX)/bin
+ install -d $(DESTDIR)$(MANPREFIX)/man1
+ install -m 0755 $(NAME) $(DESTDIR)$(PREFIX)/bin/
+ install -m 0644 $(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/

install-service: install
- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/systemd/user
- $(INSTALL) -m 0644 $(NAME).service $(DESTDIR)$(PREFIX)/lib/systemd/user/
+ install -d $(DESTDIR)$(PREFIX)/lib/systemd/user
+ install -m 0644 $(NAME).service $(DESTDIR)$(PREFIX)/lib/systemd/user/

uninstall:
@echo Removing files from $(DESTDIR)$(PREFIX)
--
2.37.1

7 changes: 3 additions & 4 deletions srcpkgs/batsignal/template
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Template file for 'batsignal'
pkgname=batsignal
version=1.3.2
version=1.5.0
revision=1
build_style=gnu-makefile
make_use_env=yes
hostmakedepends="pkg-config"
makedepends="libnotify-devel"
makedepends="libnotify-devel libglib-devel"
short_desc="Simple battery monitor"
maintainer="André Cerqueira <acerqueira021@gmail.com>"
license="ISC"
homepage="https://github.com/electrickite/batsignal"
distfiles="https://github.com/electrickite/batsignal/archive/${version}.tar.gz"
checksum=d8ecb26435b4a49f804ebc2bc1f18215a4c7cfd2a5de7e2a1ccef5263e1c04e7
checksum=be3196bac5f369348123d78cacc3d20d29005a8bc93bcbc4541231843a5a7f5f

post_install() {
vlicense LICENSE
Expand Down

0 comments on commit de6f766

Please sign in to comment.