--- ./src/Makefile.orig 2013-12-27 08:39:49.000000000 -0200 +++ ./src/Makefile 2013-12-28 00:19:50.000000000 -0200 @@ -5,7 +5,7 @@ ####### Makefile Conventions - Directory variables -prefix = /usr +prefix = /usr/local exec_prefix = $(prefix) bindir = $(exec_prefix)/bin sbindir = $(exec_prefix)/sbin @@ -19,7 +19,7 @@ infodir = $(datarootdir)/info libdir = $(exec_prefix)/lib localedir = $(datarootdir)/locale -mandir = $(datarootdir)/man +mandir = $(prefix)/man man1dir = $(mandir)/man1 manext = .1 man1ext = .1 @@ -71,7 +71,7 @@ pesec: LDFLAGS += -lcrypto pesec: compat/strlcat.c -pestr: LDFLAGS += -lpcre +pestr: LDFLAGS += -L/usr/local/lib -lpcre pehash: CFLAGS += -I$(LIBFUZZY) pehash: $(LIBFUZZY)/*.c @@ -89,18 +89,16 @@ install: installdirs for prog in $(PROGS); do \ - $(INSTALL_PROGRAM) -m 755 $$prog $(DEST); \ - $(CHK_FILE_EXISTS) $(MANDIR)/$$prog$(man1ext) && \ - gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(man1dir)/$$prog$(man1ext).gz || \ - echo -n; \ + $(INSTALL_PROGRAM) -s -m 755 $$prog $(DEST); \ + $(INSTALL_DATA) $(MANDIR)/$$prog$(man1ext) $(DESTDIR)$(man1dir); \ done # TODO: Should we copy it anyway if it already exists? - @$(CHK_FILE_EXISTS) $(SHAREDIR)/userdb.txt || cp $(srcdir)/userdb.txt $(SHAREDIR) + @$(CHK_FILE_EXISTS) $(DESTDIR)$(SHAREDIR)/userdb.txt || cp $(srcdir)/userdb.txt $(DESTDIR)$(SHAREDIR) installdirs: @$(CHK_DIR_EXISTS) $(DEST) || $(MKDIR) $(DEST) - @$(CHK_DIR_EXISTS) $(man1dir) || $(MKDIR) $(man1dir) - @$(CHK_DIR_EXISTS) $(SHAREDIR) || $(MKDIR) $(SHAREDIR) + @$(CHK_DIR_EXISTS) $(DESTDIR)$(man1dir) || $(MKDIR) $(DESTDIR)$(man1dir) + @$(CHK_DIR_EXISTS) $(DESTDIR)$(SHAREDIR) || $(MKDIR) $(DESTDIR)$(SHAREDIR) uninstall: for prog in $(PROGS); do \