--- logrotate-3.8.7.orig/Makefile	2013-06-10 13:29:16.000000000 +0200
+++ logrotate-3.8.7/Makefile	2014-03-23 15:16:09.000000000 +0100
@@ -1,11 +1,11 @@
 VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
-OS_NAME = $(shell uname -s)
+OS_NAME = Linux
 LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`)
 CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
 PROG = logrotate
 MAN = logrotate.8
 MAN5 = logrotate.conf.5
-LOADLIBES = -lpopt
+LIBS = -lpopt
 SVNURL= svn+ssh://svn.fedorahosted.org/svn/logrotate
 SVNPUBURL = http://svn.fedorahosted.org/svn/logrotate
 SVNTAG = r$(subst .,-,$(VERSION))
@@ -64,7 +64,7 @@ endif
 # Red Hat Linux
 ifeq ($(OS_NAME),Linux)
     INSTALL = install
-    BASEDIR = /usr
+    BASEDIR = $(DESTDIR)/usr
 endif
 
 # FreeBSD
@@ -117,6 +117,7 @@ RCSVERSION = $(subst .,-,$(VERSION))
 all: $(TARGET) pretest
 
 $(PROG): $(OBJS)
+	$(CC) $(LDFLAGS) -o $(PROG) $^ $(LIBS)
 
 clean:
 	rm -f $(OBJS) $(PROG) core* .depend
