Skip to content

Commit

Permalink
Merge pull request #5310 from kmk3/build-use-tarname
Browse files Browse the repository at this point in the history
build: add and use TARNAME instead of NAME for paths
  • Loading branch information
netblue30 authored Aug 14, 2022
2 parents d48736f + 7bbcf7e commit 11e06fb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ ifeq ($(HAVE_CONTRIB_INSTALL),yes)
install -m 0644 contrib/vim/syntax/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax
endif
# documents
install -m 0755 -d $(DESTDIR)$(DOCDIR)
install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/*
install -m 0755 -d $(DESTDIR)$(docdir)
install -m 0644 -t $(DESTDIR)$(docdir) COPYING README RELNOTES etc/templates/*
# profiles and settings
install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail
install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
12 changes: 7 additions & 5 deletions config.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
# up overriding the includer's intended default target (which by default is the
# first target encountered).

CC=@CC@
NAME=@PACKAGE_NAME@
TARNAME=@PACKAGE_TARNAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@ # needed by docdir
VERSION=@PACKAGE_VERSION@

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
datarootdir=@datarootdir@
docdir=@docdir@
mandir=@mandir@
sysconfdir=@sysconfdir@

VERSION=@PACKAGE_VERSION@
NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
DOCDIR=@docdir@
HAVE_APPARMOR=@HAVE_APPARMOR@
HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@
BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@
Expand Down Expand Up @@ -50,6 +51,7 @@ HAVE_ONLY_SYSCFG_PROFILES=@HAVE_ONLY_SYSCFG_PROFILES@

MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_IDS) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_SELINUX) $(HAVE_SUID) $(HAVE_FORCE_NONEWPRIVS) $(HAVE_ONLY_SYSCFG_PROFILES)

CC=@CC@
CFLAGS=@CFLAGS@

ifdef NO_EXTRA_CFLAGS
Expand Down
1 change: 1 addition & 0 deletions config.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# shellcheck disable=SC2034

NAME="@PACKAGE_NAME@"
TARNAME="@PACKAGE_TARNAME@"
VERSION="@PACKAGE_VERSION@"
4 changes: 2 additions & 2 deletions mkdeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 11e06fb

Please sign in to comment.