patch-Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- vsftpd-3.0.2.orig/Makefile 2012-09-16 09:27:35.000000000 +0200
  2. +++ vsftpd-3.0.2/Makefile 2014-02-11 12:59:30.000000000 +0100
  3. @@ -1,16 +1,16 @@
  4. # Makefile for systems with GNU tools
  5. -CC = gcc
  6. +CC ?= gcc
  7. INSTALL = install
  8. IFLAGS = -idirafter dummyinc
  9. #CFLAGS = -g
  10. -CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
  11. +CFLAGS ?= -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
  12. -Wall -W -Wshadow -Werror -Wformat-security \
  13. -D_FORTIFY_SOURCE=2 \
  14. #-pedantic -Wconversion
  15. -LIBS = `./vsf_findlibs.sh`
  16. +LIBS = -lcap -lcrypt
  17. LINK = -Wl,-s
  18. -LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now
  19. +LDFLAGS ?= -fPIE -pie -Wl,-z,relro -Wl,-z,now
  20. OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
  21. tunables.o ftpdataio.o secbuf.o ls.o \
  22. @@ -29,21 +29,8 @@ vsftpd: $(OBJS)
  23. $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
  24. install:
  25. - if [ -x /usr/local/sbin ]; then \
  26. - $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
  27. - else \
  28. - $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
  29. - if [ -x /usr/local/man ]; then \
  30. - $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
  31. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
  32. - elif [ -x /usr/share/man ]; then \
  33. - $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
  34. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
  35. - else \
  36. - $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
  37. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
  38. - if [ -x /etc/xinetd.d ]; then \
  39. - $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
  40. + mkdir -p $(DESTDIR)/usr/sbin
  41. + $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/vsftpd
  42. clean:
  43. rm -f *.o *.swp vsftpd