void-packages/srcpkgs/sqmail/patches/autouid.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```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
```
2021-06-20 13:17:29 +07:00

25 lines
978 B
Diff

We generate the file auto_uids.c ourselves.
--- a/mail/sqmail/sqmail-4.0.10/src/Makefile
+++ b/mail/sqmail/sqmail-4.0.10/src/Makefile
@@ -95,20 +95,6 @@
compile auto_split.c
./compile auto_split.c
-auto_uids.c: \
-auto-uid auto-gid ../conf-users ../conf-groups
- ( ./auto-uid auto_uida `head -1 ../conf-users` \
- &&./auto-uid auto_uidd `head -2 ../conf-users | tail -1` \
- &&./auto-uid auto_uidl `head -3 ../conf-users | tail -1` \
- &&./auto-uid auto_uido `head -4 ../conf-users | tail -1` \
- &&./auto-uid auto_uidp `head -5 ../conf-users | tail -1` \
- &&./auto-uid auto_uidq `head -6 ../conf-users | tail -1` \
- &&./auto-uid auto_uidr `head -7 ../conf-users | tail -1` \
- &&./auto-uid auto_uids `head -8 ../conf-users | tail -1` \
- &&./auto-gid auto_gidq `head -1 ../conf-groups` \
- &&./auto-gid auto_gidn `head -2 ../conf-groups | tail -1` \
- ) > auto_uids.c.tmp && mv auto_uids.c.tmp auto_uids.c
-
auto_uids.o: \
compile auto_uids.c
./compile auto_uids.c