comparison security/shadow/shadow.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 5e4b7e6fe8ed
comparison
equal deleted inserted replaced
1221:a47aaf9743a0 1222:325631424c65
85 with_selinux="--with-selinux" 85 with_selinux="--with-selinux"
86 else 86 else
87 with_selinux="--without-selinux" 87 with_selinux="--without-selinux"
88 fi 88 fi
89 89
90 rm -rf $PKGNAME-$PKGVERSION 90 build()
91 tar xvf $PKGNAME-$PKGVERSION.tar.xz 91 {
92 cd $PKGNAME-$PKGVERSION 92 rm -rf $PKGNAME-$PKGVERSION
93 tar xvf $PKGNAME-$PKGVERSION.tar.xz
94 cd $PKGNAME-$PKGVERSION
93 95
94 # 96 #
95 # Disable groups, it's provided by busybox/coreutils and documentation 97 # Disable groups, it's provided by busybox/coreutils and documentation
96 # by man-pages. 98 # by man-pages.
97 # 99 #
98 sed -i 's/groups$(EXEEXT) //' src/Makefile.in 100 sed -i 's/groups$(EXEEXT) //' src/Makefile.in
99 find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; 101 find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
100 find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; 102 find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
101 find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; 103 find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
102 104
103 CC="$CC" \ 105 CC="$CC" \
104 CFLAGS="$CFLAGS" \ 106 CFLAGS="$CFLAGS" \
105 LDFLAGS="$LDFLAGS" \ 107 LDFLAGS="$LDFLAGS" \
106 LIBS="$LIBS" \ 108 LIBS="$LIBS" \
107 ./configure \ 109 ./configure \
108 --build=$CBUILD \ 110 --build=$CBUILD \
109 --host=$CHOST \ 111 --host=$CHOST \
110 --prefix=/usr \ 112 --prefix= \
111 --bindir=/bin \ 113 --bindir=/bin \
112 --sbindir=/bin \ 114 --sbindir=/bin \
113 --enable-shared \ 115 --enable-shared \
114 $with_acl \ 116 $with_acl \
115 $with_attr \ 117 $with_attr \
116 $with_nls \ 118 $with_nls \
117 $with_pam \ 119 $with_pam \
118 $with_selinux 120 $with_selinux
119 make ubindir=/bin usbindir=/bin 121 make ubindir=/bin usbindir=/bin
120 make DESTDIR=$DESTDIR ubindir=/bin usbindir=/bin install 122 make DESTDIR=$DESTDIR ubindir=/bin usbindir=/bin install
121 123
122 if [ "$PAM" = "yes" ]; then 124 if [ "$PAM" = "yes" ]; then
123 for i in \ 125 for i in \
124 chage chfn chgpasswd chpasswd chsh groupadd groupdel \ 126 chage chfn chgpasswd chpasswd chsh groupadd groupdel \
125 groupmems groupmod login newusers passwd su useradd \ 127 groupmems groupmod login newusers passwd su useradd \
126 userdel usermod; do 128 userdel usermod; do
127 install -Dm0600 ../$i $DESTDIR/etc/pam.d/$i 129 install -Dm0600 ../$i $DESTDIR/etc/pam.d/$i
128 done 130 done
129 fi 131 fi
130 132
131 cd .. 133 cd ..
132 rm -rf $PKGNAME-$PKGVERSION 134 rm -rf $PKGNAME-$PKGVERSION
135 }