Files
termux-packages/root-packages/authbind/Makefile.patch
termux-pacman-bot 666ac7ae22 bump(root/authbind): 2.2.0
Signed-off-by: Aditya Alok <alok@termux.dev>
2025-01-22 16:04:14 +00:00

65 lines
2.0 KiB
Diff

--- work/Makefile 2024-11-11 05:34:16.000000000 +0530
+++ work.mod/Makefile 2025-01-22 21:07:53.919440191 +0530
@@ -17,28 +17,28 @@
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
DESTDIR ?=
-prefix=/usr/local
+prefix=@TERMUX_PREFIX@
bin_dir=$(prefix)/bin
-lib_dir=$(prefix)/lib/authbind
-libexec_dir=$(lib_dir)
+lib_dir=$(prefix)/lib
+libexec_dir=$(prefix)/libexec/authbind
share_dir=$(prefix)/share
man_dir=$(share_dir)/man
man1_dir=$(man_dir)/man1
man8_dir=$(man_dir)/man8
-etc_dir=/etc/authbind
+etc_dir=@TERMUX_PREFIX@/etc/authbind
-INSTALL_FILE ?= install -o root -g root -m 644
-INSTALL_PROGRAM ?= install -o root -g root -m 755 -s
-INSTALL_DIR ?= install -o root -g root -m 755 -d
+INSTALL_FILE ?= install -m 644
+INSTALL_PROGRAM ?= install -m 755 -s --strip-program=$(STRIP)
+INSTALL_DIR ?= install -m 755 -d
STRIP ?= strip
OPTIMISE= -O2
-LDFLAGS= -g
+LDFLAGS?= -g
LIBS= -ldl -lc
-CFLAGS= -g $(OPTIMISE) \
+CFLAGS= \
-Wall -Wwrite-strings -Wpointer-arith -Wimplicit \
-Wnested-externs -Wmissing-prototypes -Wstrict-prototypes
CPPFLAGS= -DMAJOR_VER='"$(MAJOR)"' -DMINOR_VER='"$(MINOR)"' \
@@ -60,13 +60,11 @@
all: $(TARGETS)
install: $(TARGETS)
- $(INSTALL_DIR) $(DESTDIR)$(bin_dir) $(DESTDIR)$(lib_dir)
+ $(INSTALL_DIR) $(DESTDIR)$(bin_dir) $(DESTDIR)$(lib_dir) $(DESTDIR)$(libexec_dir)
$(INSTALL_PROGRAM) $(BINTARGETS) $(DESTDIR)$(bin_dir)/.
$(INSTALL_FILE) $(LIBTARGET) $(DESTDIR)$(lib_dir)/.
- $(STRIP) --strip-unneeded $(DESTDIR)$(lib_dir)/$(LIBTARGET)
ln -sf $(LIBTARGET) $(DESTDIR)$(lib_dir)/$(LIBCANON)
$(INSTALL_PROGRAM) $(HELPER) $(DESTDIR)$(libexec_dir)/.
- chmod u+s $(DESTDIR)$(libexec_dir)/$(HELPER)
$(INSTALL_DIR) $(DESTDIR)$(etc_dir) \
$(DESTDIR)$(etc_dir)/byport $(DESTDIR)$(etc_dir)/byaddr $(DESTDIR)$(etc_dir)/byuid
@@ -84,7 +82,7 @@
helper.o authbind.o: authbind.h
$(LIBTARGET): libauthbind.o
- $(LD) -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
+ $(CC) -shared -Wl,-soname=$(LIBCANON) -o $@ $< $(LIBS)
clean distclean:
rm -f $(TARGETS) *.o *~ ./#*# *.bak *.new core