![Maxime Hadjinlian](/assets/img/avatar_default.png)
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the transition into a new directory structure for DL_DIR. This commit has been generated with the following scripts: for i in $(find . -iname "*.mk"); do if ! grep -q "\$(DL_DIR)" ${i}; then continue fi pkg_name="$(basename $(dirname ${i}))" [ "${pkg_name}" = "package" ] && continue raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_') pkg_dl_dir="${raw_pkg_name}_DL_DIR" sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i} done Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
53 lines
1.5 KiB
Makefile
53 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# cracklib
|
|
#
|
|
################################################################################
|
|
|
|
CRACKLIB_VERSION = 2.9.6
|
|
CRACKLIB_SITE = https://github.com/cracklib/cracklib/releases/download/cracklib-$(CRACKLIB_VERSION)
|
|
CRACKLIB_LICENSE = LGPL-2.1
|
|
CRACKLIB_LICENSE_FILES = COPYING.LIB
|
|
CRACKLIB_INSTALL_STAGING = YES
|
|
CRACKLIB_DEPENDENCIES = host-cracklib
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
CRACKLIB_CONF_OPTS += --with-zlib
|
|
CRACKLIB_DEPENDENCIES += zlib
|
|
else
|
|
CRACKLIB_CONF_OPTS += --without-zlib
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
|
CRACKLIB_CONF_OPTS += --with-python
|
|
CRACKLIB_DEPENDENCIES += python
|
|
else
|
|
CRACKLIB_CONF_OPTS += --without-python
|
|
endif
|
|
|
|
HOST_CRACKLIB_CONF_OPTS += --without-python --without-zlib
|
|
|
|
ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
|
|
CRACKLIB_EXTRA_DOWNLOADS = cracklib-words-$(CRACKLIB_VERSION).gz
|
|
CRACKLIB_DICT_SOURCE = $(CRACKLIB_DL_DIR)/cracklib-words-$(CRACKLIB_VERSION).gz
|
|
else
|
|
CRACKLIB_DICT_SOURCE = $(@D)/dicts/cracklib-small
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_CRACKLIB_TOOLS),)
|
|
define CRACKLIB_REMOVE_TOOLS
|
|
rm -f $(TARGET_DIR)/usr/sbin/*cracklib*
|
|
endef
|
|
CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_REMOVE_TOOLS
|
|
endif
|
|
|
|
define CRACKLIB_BUILD_DICT
|
|
$(HOST_MAKE_ENV) cracklib-format $(CRACKLIB_DICT_SOURCE) | \
|
|
$(HOST_MAKE_ENV) cracklib-packer $(TARGET_DIR)/usr/share/cracklib/pw_dict
|
|
rm $(TARGET_DIR)/usr/share/cracklib/cracklib-small
|
|
endef
|
|
CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_BUILD_DICT
|
|
|
|
$(eval $(autotools-package))
|
|
$(eval $(host-autotools-package))
|