]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Link coreutils against libpam.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 May 2009 11:14:09 +0000 (13:14 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 May 2009 11:14:09 +0000 (13:14 +0200)
lfs/coreutils

index ada6c57b9b05320c0a0e9bdf6d445a3c9fdeaf5b..b4f11b95568eebdc65c0fd01ce49e1754514d9e9 100644 (file)
@@ -39,7 +39,7 @@ GROUP      = System/Base
 CORE       = yes
 EXTRA      = no
 DEBUG      = no
-DEPS       =
+DEPS       = attr libcap2 ncurses pam shadow util-linux-ng
 
 URL        = http://www.gnu.org/software/coreutils/
 LICENSE    = GPLv3+
@@ -50,7 +50,7 @@ define LONG_DESC
        the old GNU fileutils, sh-utils, and textutils packages.
 endef
 
-CFLAGS    += -fno-strict-aliasing
+CFLAGS    += -D_GNU_SOURCE=1 -fno-strict-aliasing
 
 ###############################################################################
 # Top-level Rules
@@ -103,9 +103,12 @@ ifeq "$(STAGE)" "base"
                ./configure \
                        $(CONFIGURE_ARCH) \
                        --prefix=/usr \
-                       --enable-install-program=hostname \
+                       --enable-largefile \
+                       --enable-install-program=arch,hostname,su \
                        --enable-no-install-program=kill,uptime
-       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
+
+       cd $(DIR_APP) && make $(PARALLELISMFLAGS) \
+               CPPFLAGS="-DUSE_PAM" su_LDFLAGS="-pie -lpam -lpam_misc"
        cd $(DIR_APP) && make install
 
        mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
@@ -114,12 +117,13 @@ ifeq "$(STAGE)" "base"
        mv -v /usr/bin/chroot /usr/sbin
        mv -v /usr/bin/{head,sleep,nice} /bin
 
+       cd $(DIR_APP) && install -m 4755 src/su /bin
+
        # Dump /etc/dircolors.
        dircolors -p > /etc/dircolors
 
        # PAM
-       -mkdir -pv /etc/pam.d/
-       cp -vf $(DIR_CONFIG)/pam.d/su /etc/pam.d
+       cp -vf $(DIR_CONFIG)/pam.d/su{,-l} /etc/pam.d
 endif
 
        @rm -rf $(DIR_APP)