Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2003-09-13 Initial Package Version: 2.7 Origin: Gentoo Description: Makefile Clean diff -Naur cracklib,2.7.orig/Makefile cracklib,2.7/Makefile --- cracklib,2.7.orig/Makefile 1997-12-31 10:33:53.000000000 +0000 +++ cracklib,2.7/Makefile 2003-09-13 09:57:03.000000000 +0000 @@ -7,14 +7,21 @@ ### ### +# cracklib version +MAJOR=2 +MINOR=7 +VERSION=$(MAJOR).$(MINOR) +export MAJOR MINOR VERSION + +### # set this to the absolute path (less extn) of compressed dict. -DICTPATH="/usr/local/lib/pw_dict" +DICTPATH="/usr/lib/cracklib_dict" ### # Set this to the path of one or more files continaing wordlists. -SRCDICTS=/usr/dict/words +SRCDICTS=/usr/share/dict/words /usr/share/dict/extra.words ### # If you have installed the cracklib-dicts directory, use this @@ -36,7 +43,9 @@ -rm -f all installed Part* *.BAK *.bak *~ install: all + ( cd cracklib && make install && exit $$? ) + ( cd util && make install && exit $$? ) @echo 'if "sort" dies from lack of space, see "util/mkdict"' - util/mkdict $(SRCDICTS) | util/packer $(DICTPATH) + util/mkdict $(SRCDICTS) | LD_LIBRARY_PATH=cracklib util/packer $(DESTDIR)$(DICTPATH) touch installed ### @echo 'now go install passwd/passwd where you want it' diff -Naur cracklib,2.7.orig/cracklib/Makefile cracklib,2.7/cracklib/Makefile --- cracklib,2.7.orig/cracklib/Makefile 1997-12-14 22:49:21.000000000 +0000 +++ cracklib,2.7/cracklib/Makefile 2003-09-13 09:57:03.000000000 +0000 @@ -6,13 +6,21 @@ # and upwards. ### -LIB= libcrack.a -OBJ= fascist.o packlib.o rules.o stringlib.o -CFLAGS= -O -I../cracklib -DIN_CRACKLIB +LIB = libcrack.so +OBJ = fascist.o packlib.o rules.o stringlib.o +CFLAGS += -g -I../cracklib -DIN_CRACKLIB -fPIC +LD = ld -$(LIB): $(OBJ) - ar rv $(LIB) $? - -ranlib $(LIB) +$(LIB): $(OBJ) Makefile + $(LD) -shared -soname $(LIB).$(MAJOR) -o $(LIB).$(VERSION) $(OBJ) -lc + rm -f $(LIB).$(MAJOR) $(LIB) + ln -s $(LIB).$(VERSION) $(LIB).$(MAJOR) + ln -s $(LIB).$(MAJOR) $(LIB) clean: - -rm -f $(OBJ) $(LIB) *~ + -rm -f $(OBJ) $(LIB) $(LIB).$(VERSION) *~ + +install: $(LIB) crack.h + install -m 755 $(LIB).$(VERSION) $(DESTDIR)/usr/lib + ln -sf $(LIB).$(VERSION) $(DESTDIR)/usr/lib/$(LIB) + install -m 644 crack.h $(DESTDIR)/usr/include diff -Naur cracklib,2.7.orig/util/Makefile cracklib,2.7/util/Makefile --- cracklib,2.7.orig/util/Makefile 1997-12-14 22:49:34.000000000 +0000 +++ cracklib,2.7/util/Makefile 2003-09-13 09:57:03.000000000 +0000 @@ -14,27 +14,31 @@ #SunOS users (and others?) should consider static linking of their passwd binary #CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"' -Bstatic -CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"' -LIBS= ../cracklib/libcrack.a +CFLAGS += -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"' +LDFLAGS = -L../cracklib -lcrack +LIBS = ../cracklib/libcrack.so all: packer unpacker testnum teststr testlib touch all packer: packer.o $(LIBS) - cc $(CFLAGS) -o $@ $@.o $(LIBS) + $(CC) $(CFLAGS) -o $@ $@.o $(LDFLAGS) unpacker: unpacker.o $(LIBS) - cc $(CFLAGS) -o $@ $@.o $(LIBS) + $(CC) $(CFLAGS) -o $@ $@.o $(LDFLAGS) testnum: testnum.o $(LIBS) - cc $(CFLAGS) -o $@ $@.o $(LIBS) + $(CC) $(CFLAGS) -o $@ $@.o $(LDFLAGS) teststr: teststr.o $(LIBS) - cc $(CFLAGS) -o $@ $@.o $(LIBS) + $(CC) $(CFLAGS) -o $@ $@.o $(LDFLAGS) testlib: testlib.o $(LIBS) - cc $(CFLAGS) -o $@ $@.o $(LIBS) + $(CC) $(CFLAGS) -o $@ $@.o $(LDFLAGS) clean: -rm *.o *~ all -rm teststr testnum testlib packer unpacker + +install: all create-cracklib-dict + install -m 755 mkdict packer create-cracklib-dict $(DESTDIR)/usr/sbin