76acfa2dd2
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -22,6 +22,8 @@ OBJS = main.o utility.o prelogin.o ftpcm
|
|
seccompsandbox.o
|
|
|
|
|
|
+DESTDIR =
|
|
+
|
|
.c.o:
|
|
$(CC) -c $*.c $(CFLAGS) $(IFLAGS)
|
|
|
|
@@ -29,21 +31,20 @@ vsftpd: $(OBJS)
|
|
$(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
|
|
|
|
install:
|
|
- if [ -x /usr/local/sbin ]; then \
|
|
- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
|
|
- else \
|
|
- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
|
|
- if [ -x /usr/local/man ]; then \
|
|
- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
|
|
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
|
|
- elif [ -x /usr/share/man ]; then \
|
|
- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
|
|
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
|
|
- else \
|
|
- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
|
|
- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
|
|
- if [ -x /etc/xinetd.d ]; then \
|
|
- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
|
|
+ mkdir -p $(DESTDIR)/usr/sbin
|
|
+ $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/
|
|
+ mkdir -p $(DESTDIR)/usr/share/man/man8
|
|
+ $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/
|
|
+ mkdir -p $(DESTDIR)/usr/share/man/man5
|
|
+ $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/
|
|
+ mkdir -p $(DESTDIR)/etc/xinetd.d
|
|
+ $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/
|
|
+
|
|
+uninstall:
|
|
+ rm -f $(DESTDIR)/usr/sbin/vsftpd
|
|
+ rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8
|
|
+ rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5
|
|
+ rm -f $(DESTDIR)/etc/xinetd.d/vsftpd
|
|
|
|
clean:
|
|
rm -f *.o *.swp vsftpd
|