diff --git a/srcpkgs/find-cursor/patches/fix-makefile.patch b/srcpkgs/find-cursor/patches/fix-makefile.patch new file mode 100644 index 0000000000..3e8719385f --- /dev/null +++ b/srcpkgs/find-cursor/patches/fix-makefile.patch @@ -0,0 +1,36 @@ +From ef50d47a314e6906ed2b6e39a5517f6c5937213b Mon Sep 17 00:00:00 2001 +From: maxice8 +Date: Tue, 18 Sep 2018 17:10:31 -0300 +Subject: [PATCH] Makefile: Fix installation and stripping + +- Separate stripping into another step of the package +- Conditionalize stripping the binary, distros don't like when packages do +it because they want the debug symbols included and do their own +stripping after extracting them +- use -Dm755 to create the directory (-D) and set the correct executable +mode +- respect PREFIX which can be set to /usr /usr/local and even / +- respect DESTDIR which is set by distros when they are packaging +--- + Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- Makefile ++++ Makefile +@@ -1,8 +1,11 @@ + CC?=cc + CFLAGS?=-std=c99 -pedantic -Wall -Os ++STRIP?=strip ++PREFIX?=/usr + + all: + ${CC} ${CFLAGS} -o find-cursor find-cursor.c -lX11 -lXext -lXfixes + + install: +- install --strip -o root -g root find-cursor /bin/ ++ $(STRIP) find-cursor ++ install -Dm755 find-cursor $(DESTDIR)$(PREFIX)/bin/find-cursor +-- +2.19.0 + + diff --git a/srcpkgs/find-cursor/template b/srcpkgs/find-cursor/template index 10069ba052..5ab8f9a2bc 100644 --- a/srcpkgs/find-cursor/template +++ b/srcpkgs/find-cursor/template @@ -1,23 +1,15 @@ # Template file for 'find-cursor' pkgname=find-cursor -version=0.0.0.20180321 +version=1.0 revision=1 -_commit=aaefd2efe76dda50d0876c8c6861f6487f27b4ae -wrksrc="${pkgname}-${_commit}" build_style=gnu-makefile -hostmakedepends="automake" makedepends="libXdamage-devel libXrender-devel" short_desc="Highlight the cursor position in X" maintainer="biopsin " license="MIT" homepage="https://github.com/Carpetsmoker/find-cursor" -distfiles="https://github.com/Carpetsmoker/find-cursor/archive/${_commit}.tar.gz" -checksum=091ec913cfb05464a4aacf79c55c8e94c53af97d9386ecc3be056d1ca01de445 - -do_install() { - # override Makefile install bug - vbin find-cursor -} +distfiles="https://github.com/Carpetsmoker/find-cursor/archive/v${version}.tar.gz" +checksum=8869cbd3366750df03f5921aae460feb6c262cc0c6f4bb170a815add99eaa2c8 post_install() { vlicense LICENSE