patch-Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- vsftpd-2.2.0.orig/Makefile 2009-05-22 21:44:52.000000000 +0200
  3. +++ vsftpd-2.2.0/Makefile 2009-08-21 00:46:32.980346849 +0200
  4. @@ -1,12 +1,12 @@
  5. # Makefile for systems with GNU tools
  6. -CC = gcc
  7. +CC ?= gcc
  8. INSTALL = install
  9. IFLAGS = -idirafter dummyinc
  10. #CFLAGS = -g
  11. -CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
  12. +CFLAGS ?= -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
  13. -LIBS = `./vsf_findlibs.sh`
  14. -LINK = -Wl,-s
  15. +LIBS = -lcrypt
  16. +LINK =
  17. OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
  18. tunables.o ftpdataio.o secbuf.o ls.o \
  19. @@ -17,6 +17,8 @@ OBJS = main.o utility.o prelogin.o ftpcm
  20. ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o
  21. +DESTDIR =
  22. +
  23. .c.o:
  24. $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
  25. @@ -24,21 +26,20 @@ vsftpd: $(OBJS)
  26. $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) $(LDFLAGS)
  27. install:
  28. - if [ -x /usr/local/sbin ]; then \
  29. - $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
  30. - else \
  31. - $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
  32. - if [ -x /usr/local/man ]; then \
  33. - $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
  34. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
  35. - elif [ -x /usr/share/man ]; then \
  36. - $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
  37. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
  38. - else \
  39. - $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
  40. - $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
  41. - if [ -x /etc/xinetd.d ]; then \
  42. - $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
  43. + mkdir -p $(DESTDIR)/usr/sbin
  44. + $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/
  45. + mkdir -p $(DESTDIR)/usr/share/man/man8
  46. + $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/
  47. + mkdir -p $(DESTDIR)/usr/share/man/man5
  48. + $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/
  49. + mkdir -p $(DESTDIR)/etc/xinetd.d
  50. + $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/
  51. +
  52. +uninstall:
  53. + rm -f $(DESTDIR)/usr/sbin/vsftpd
  54. + rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8
  55. + rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5
  56. + rm -f $(DESTDIR)/etc/xinetd.d/vsftpd
  57. clean:
  58. rm -f *.o *.swp vsftpd