Check-Script: rules Author: Russ Allbery Type: source Unpack-Level: 1 Needs-Info: debfiles Info: Check targets and actions in debian/rules. Abbrev: rul Tag: debian-rules-is-symlink Type: warning Info: The file debian/rules is a symlink instead of a regular file. This is unnecessary and makes package checking and manipulation more difficult. If the rules file should be available in the source package under multiple names, make debian/rules the real file and the other names symlinks to it. . This problem may have prevented lintian from performing other checks, leading to undetected changelog errors. Tag: debian-rules-not-a-makefile Type: error Ref: policy 4.9 Info: The debian/rules file for this package does not appear to be a makefile or does not start with the required line. debian/rules must be a valid makefile and must have "#!/usr/bin/make -f" as its first line. Tag: debian-rules-missing-required-target Type: error Ref: policy 4.9 Info: The debian/rules file for this package does not provide one of the required targets. All of build, binary, binary-arch, binary-indep, and clean must be provided, even if they don't do anything for this package. Tag: debian-rules-uses-pwd Type: warning Info: The debian/rules file for this package appears to use the variable $(PWD) to refer to the current directory. This variable is not set by GNU make and therefore will have whatever value it has in the environment, which may not be the actual current directory. Some ways of building Debian packages (such as through sudo) will clear the PWD environment variable. . Instead of $(PWD), use $(CURDIR), which is set by GNU make, ignores the environment, and is guaranteed to always be set. Tag: debian-rules-ignores-make-clean-error Type: warning Info: A rule in the debian/rules file for this package calls the package's clean or distclean target with a line like: . -$(MAKE) distclean or $(MAKE) -i distclean . The leading "-" or the option -i tells make to ignore all errors. Normally this is done for packages using Autoconf since Makefile may not exist. However, this line ignores all other error messages, not just the missing Makefile error. It's better to use: . [ ! -f Makefile ] || $(MAKE) distclean . so that other error messages from the clean or distclean rule will still be caught (or just remove the "-" if the package uses a static makefile). Tag: debian-rules-uses-DEB_BUILD_OPTS Type: warning Info: The standard environment variable for build options is DEB_BUILD_OPTIONS. Usually, referring to DEB_BUILD_OPTS is a mistake and DEB_BUILD_OPTIONS was intended instead. Tag: debian-rules-sets-DH_COMPAT Type: warning Ref: debhelper(7) Info: As of debhelper version 4, the DH_COMPAT environment variable is only to be used for temporarily overriding debian/compat. Any line in debian/rules that sets it globally should be deleted and a separate debian/compat file created if needed. Tag: binary-arch-rules-but-pkg-is-arch-indep Type: warning Info: It looks like you try to run code in the binary-arch target of debian/rules, even though your package is architecture- independent. Tag: desktop-file-but-no-dh_desktop-call Type: warning Info: It looks like your package includes a .desktop file and you use debhelper to build it, but you don't call dh_desktop in your rules file. Tag: debian-rules-calls-debhelper-in-odd-order Type: warning Info: One of the targets in the debian/rules file for this package calls debhelper programs in an odd order. Normally, dh_makeshlibs should be called before dh_shlibdeps or dh_installdeb, dh_shlibdeps should be called before dh_gencontrol, and all should be called before dh_builddeb. Calling them in the wrong order may cause incorrect or missing package files and metadata.