Repository navigation
Expand file tree
/
Copy pathMakefile.patch
More file actions
64 lines (54 loc) · 2.04 KB
/
Copy pathMakefile.patch
File metadata and controls
64 lines (54 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- 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