--- /dev/null
+Make the package autoreconfigurable
+
+Adjust a minor detail in configure.ac in order to make the package
+compatible with the autoconf/automake versions we are using in
+Buildroot.
+
+Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,6 +1,6 @@
+ AC_INIT([logrotate],[3.8.9])
+
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+ AC_DEFINE(_GNU_SOURCE)
+
+ AM_EXTRA_RECURSIVE_TARGETS([test])
#
################################################################################
-LOGROTATE_VERSION = 3.8.7
+LOGROTATE_VERSION = 3.8.9
LOGROTATE_SITE = https://www.fedorahosted.org/releases/l/o/logrotate
LOGROTATE_LICENSE = GPLv2+
LOGROTATE_LICENSE_FILES = COPYING
-
LOGROTATE_DEPENDENCIES = popt host-pkgconf
+# tarball does not have a generated configure script
+LOGROTATE_AUTORECONF = YES
+LOGROTATE_CONF_ENV = LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs popt)"
+LOGROTATE_CONF_OPTS = --without-selinux
-define LOGROTATE_BUILD_CMDS
- $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LDFLAGS="$(LDFLAGS)" \
- LOADLIBES="$(shell $(PKG_CONFIG_HOST_BINARY) --libs popt)" \
- -C $(@D)
-endef
+ifeq ($(BR2_PACKAGE_ACL),y)
+LOGROTATE_DEPENDENCIES += acl
+LOGROTATE_CONF_OPTS += --with-acl
+else
+LOGROTATE_CONF_OPTS += --without-acl
+endif
-define LOGROTATE_INSTALL_TARGET_CMDS
- $(MAKE) PREFIX=$(TARGET_DIR) -C $(@D) install
+define LOGROTATE_INSTALL_TARGET_CONF
$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
endef
+LOGROTATE_POST_INSTALL_TARGET_HOOKS += LOGROTATE_INSTALL_TARGET_CONF
-$(eval $(generic-package))
+$(eval $(autotools-package))