summaryrefslogtreecommitdiffstats
path: root/shadow/Pkgfile
blob: 2a0b73facced64455a219115fc1191bad3d55272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Description: Utilitaire permettant de cacher les fichiers de mot de passe
# URL: http://shadow.pld.org.pl/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on:linux-pam
# Run on:linux-pam

name=shadow
version=4.1.5
release=1
source=(http://pkg-shadow.alioth.debian.org/releases/$name-$version.tar.bz2
	http://www.linuxfromscratch.org/patches/lfs/development/$name-$version-nscd-1.patch
	shadow-add-missing-include.patch)

build() {
	cd $name-$version

	patch -p1 < ../$name-$version-nscd-1.patch
	patch -p1 < ../shadow-add-missing-include.patch

	# Disable the installation of groups
	sed -i 's/groups$(EXEEXT) //' src/Makefile.in
	find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;

	# Disable the installation of the non french manual pages
	# Instead of using the default crypt  method, use the more secure SHA512 method of password encryption
	sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
	       -e 's@/var/spool/mail@/var/mail@' etc/login.defs

	./configure --sysconfdir=/etc --without-libpam
	make
	make DESTDIR=$PKG install
	for i in de cs fi id hu ja it ko pl ru sv tr pt_BR zh_CN zh_TW
		do rm -r $PKG/usr/share/man/$i
	done

	# Remove the default as it is part of aaabasicfs
	rm -rf $PKG/etc/default
	mkdir $PKG/usr/lib
	mv -v $PKG/usr/bin/passwd $PKG/bin
}