mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
build: use TARNAME instead of NAME for paths
PACKAGE_TARNAME is the same as PACKAGE_NAME but normalized, so it should
be safer to use in paths. For example, on a downstream project, if
spaces or shell metacharacters are added to the package name, a path
that uses PACKAGE_TARNAME should keep working.
From the manual of GNU Autoconf (version 2.69):
> -- Macro: AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
> Process any command-line arguments and perform initialization and
> verification.
>
> Set the name of the PACKAGE and its VERSION. These are typically
> used in '--version' support, including that of 'configure'. The
> optional argument BUG-REPORT should be the email to which users
> should send bug reports. The package TARNAME differs from
> PACKAGE: the latter designates the full package name (e.g., 'GNU
> Autoconf'), while the former is meant for distribution tar ball
> names (e.g., 'autoconf'). It defaults to PACKAGE with 'GNU '
> stripped, lower-cased, and all characters other than
> alphanumerics and underscores are changed to '-'.
Note also that by default (on autoconf v2.69), `docdir=@docdir@` in
config.mk.in expands to the following in config.mk:
docdir=${datarootdir}/doc/${PACKAGE_TARNAME}
This commit is contained in:
parent
891fd02701
commit
7bbcf7eab2
2 changed files with 12 additions and 12 deletions
20
Makefile
20
Makefile
|
|
@ -221,14 +221,14 @@ dist: config.mk
|
|||
make distclean
|
||||
mv config.status.old config.status
|
||||
mv config.sh.old config.sh
|
||||
rm -fr $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz
|
||||
mkdir -p $(NAME)-$(VERSION)/test
|
||||
cp -a $(DISTFILES) $(NAME)-$(VERSION)
|
||||
cp -a $(DISTFILES_TEST) $(NAME)-$(VERSION)/test
|
||||
rm -rf $(NAME)-$(VERSION)/src/tools
|
||||
find $(NAME)-$(VERSION) -name .svn -delete
|
||||
tar -cJvf $(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
|
||||
rm -fr $(NAME)-$(VERSION)
|
||||
rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz
|
||||
mkdir -p $(TARNAME)-$(VERSION)/test
|
||||
cp -a $(DISTFILES) $(TARNAME)-$(VERSION)
|
||||
cp -a $(DISTFILES_TEST) $(TARNAME)-$(VERSION)/test
|
||||
rm -rf $(TARNAME)-$(VERSION)/src/tools
|
||||
find $(TARNAME)-$(VERSION) -name .svn -delete
|
||||
tar -cJvf $(TARNAME)-$(VERSION).tar.xz $(TARNAME)-$(VERSION)
|
||||
rm -fr $(TARNAME)-$(VERSION)
|
||||
|
||||
asc: config.mk
|
||||
./mkasc.sh $(VERSION)
|
||||
|
|
@ -240,11 +240,11 @@ deb-apparmor: dist config.sh
|
|||
./mkdeb.sh -apparmor --enable-apparmor
|
||||
|
||||
test-compile: dist config.mk
|
||||
cd test/compile; ./compile.sh $(NAME)-$(VERSION)
|
||||
cd test/compile; ./compile.sh $(TARNAME)-$(VERSION)
|
||||
|
||||
.PHONY: rpms
|
||||
rpms: src/man config.mk
|
||||
./platform/rpm/mkrpm.sh $(NAME) $(VERSION)
|
||||
./platform/rpm/mkrpm.sh $(TARNAME) $(VERSION)
|
||||
|
||||
extras: all
|
||||
$(MAKE) -C extras/firetools
|
||||
|
|
|
|||
4
mkdeb.sh
4
mkdeb.sh
|
|
@ -14,8 +14,8 @@ EXTRA_VERSION=$1
|
|||
|
||||
test "$#" -gt 0 && shift
|
||||
|
||||
CODE_ARCHIVE="$NAME-$VERSION.tar.xz"
|
||||
CODE_DIR="$NAME-$VERSION"
|
||||
CODE_ARCHIVE="$TARNAME-$VERSION.tar.xz"
|
||||
CODE_DIR="$TARNAME-$VERSION"
|
||||
INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian"
|
||||
DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue