[arch-commits] Commit in unhide/trunk (Makefile PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Tue Nov 13 21:38:08 UTC 2018


    Date: Tuesday, November 13, 2018 @ 21:38:07
  Author: eschwartz
Revision: 407227

upgpkg: unhide 20130526-3

Use simple Makefile to compile using builtin rules for CFLAGS/LDFLAGS support
plus not hardcoding compiler logic in the PKGBUILD.

PIE/BUILDINFO rebuild

use HTTPS url/sources

install all manpages

Added:
  unhide/trunk/Makefile
Modified:
  unhide/trunk/PKGBUILD

----------+
 Makefile |   25 +++++++++++++++++++++++++
 PKGBUILD |   25 ++++++++++++-------------
 2 files changed, 37 insertions(+), 13 deletions(-)

Added: Makefile
===================================================================
--- Makefile	                        (rev 0)
+++ Makefile	2018-11-13 21:38:07 UTC (rev 407227)
@@ -0,0 +1,25 @@
+PREFIX ?= /usr/local
+
+BINS ?= unhide-linux unhide_rb unhide-tcp unhide-posix
+LINUX_SRC:= $(sort $(wildcard unhide-linux*.c))
+
+CFLAGS ?= -Wall
+CFLAGS += -Wall
+
+all: $(BINS)
+unhide-linux: $(LINUX_SRC) unhide-output.c
+unhide-linux: LDFLAGS += -pthread
+unhide-tcp: unhide-tcp.c unhide-tcp-fast.c unhide-output.c
+
+install:
+	install -d -m 755 '$(DESTDIR)$(PREFIX)'/bin
+	for bin in $(BINS); do \
+	    install -m 755 $$bin '$(DESTDIR)$(PREFIX)'/bin/$$bin; \
+	done
+	for man in man/*.8 man/*/*.8; do \
+	    lang=$${man%/*}; \
+	    lang=$${lang#man}; \
+	    manfile=$${man##*/}; \
+	    install -d -m 755 '$(DESTDIR)$(PREFIX)'/share/man/$$lang/man8; \
+	    install -m 644 $$man '$(DESTDIR)$(PREFIX)'/share/man/$$lang/man8/$$manfile; \
+	done

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-11-13 21:38:05 UTC (rev 407226)
+++ PKGBUILD	2018-11-13 21:38:07 UTC (rev 407227)
@@ -2,29 +2,28 @@
 
 pkgname=unhide
 pkgver=20130526
-pkgrel=2
+pkgrel=3
 pkgdesc='A forensic tool to find processes hidden by rootkits, LKMs or by other techniques.'
 arch=('x86_64')
-url='http://sourceforge.net/projects/unhide/'
+url='https://sourceforge.net/projects/unhide/'
 license=('GPL3')
 depends=('iproute2' 'lsof' 'psmisc' 'net-tools' 'procps-ng')
-source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-$pkgver.tgz")
-md5sums=('f3d68ed8eb239614abb0ff5ace22cf85')
+source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-$pkgver.tgz"
+        "Makefile")
+md5sums=('f3d68ed8eb239614abb0ff5ace22cf85'
+         '68ec8dcd2f25d4d5dad089a8535d462f')
 
+prepare() {
+  cp -f Makefile $pkgname-$pkgver/
+}
+
 build() {
   cd $pkgname-$pkgver
-  cc -Wall -O2 --static -pthread unhide-linux*.c unhide-output.c -o unhide-linux
-  cc -Wall -O2 --static unhide_rb.c -o unhide_rb
-  cc -Wall -O2 --static unhide-posix.c -o unhide-posix
-  cc -Wall -O2 --static unhide-tcp.c unhide-tcp-fast.c unhide-output.c -o unhide-tcp
+  make
 }
 
 package() {
   cd $pkgname-$pkgver
-  for _p in unhide-linux unhide-posix unhide_rb unhide-tcp; do
-    install -Dm0755 "$_p" "$pkgdir/usr/bin/$_p"
-  done
+  make PREFIX=/usr DESTDIR="$pkgdir" install
   ln -s unhide-linux "$pkgdir/usr/bin/unhide"
-  install -Dm0644 man/unhide.8 "$pkgdir/usr/share/man/man8/unhide.8"
 }
-



More information about the arch-commits mailing list