2fd8d4df94
```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 ```
23 lines
767 B
Diff
23 lines
767 B
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -17,9 +17,9 @@ TARGETS=otpw-gen demologin pam_otpw.so pam_otpw.8.gz otpw-gen.1.gz
|
|
all: $(TARGETS)
|
|
|
|
otpw-gen: otpw-gen.o rmd160.o md.o otpw.o
|
|
- $(CC) -o $@ $+
|
|
+ $(CC) -o $@ $+ $(LDFLAGS)
|
|
demologin: demologin.o otpw.o rmd160.o md.o
|
|
- $(CC) -o $@ $+ -lcrypt
|
|
+ $(CC) -o $@ $+ -lcrypt $(LDFLAGS)
|
|
|
|
otpw-gen.o: otpw-gen.c md.h otpw.h
|
|
otpw.o: otpw.c otpw.h md.h
|
|
@@ -28,7 +28,7 @@ rmd160.o: rmd160.c rmd160.h
|
|
otpw-l.o: otpw-l.c otpw.c otpw.h md.h
|
|
pam_otpw.o: pam_otpw.c otpw.h md.h
|
|
pam_otpw.so: pam_otpw.o otpw-l.o rmd160.o md.o
|
|
- ld --shared -o $@ $+ -lcrypt -lpam -lpam_misc
|
|
+ $(CC) -shared -o $@ $+ -lcrypt -lpam -lpam_misc $(LDFLAGS)
|
|
|
|
distribution:
|
|
git archive --prefix otpw-$(VERSION)/ -o otpw-$(VERSION).tar.gz v$(VERSION)
|