Skip to content

Commit

Permalink
v0.0.13: don't force AES256 on GPG de-/encryption
Browse files Browse the repository at this point in the history
- structural improvements to reduce redundancies
  • Loading branch information
Yann Büchau committed Jun 11, 2017
1 parent ff75266 commit db94949
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 189 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ config.status

# instantiated template files
Makefile
bin/uca-apply
m4/tuca.m4
share/thunar-custom-actions/system-uca/*.xml
146 changes: 30 additions & 116 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,110 +1,5 @@
#!@make_bin@ -f

############################################################
### get all the ./configure arguments into this Makefile ###
############################################################

# install architecture-independent files in PREFIX [/usr/local]
prefix:=@prefix@
# install architecture-dependent files in EPREFIX [PREFIX]
exec_prefix:=@exec_prefix@
# user executables [EPREFIX/bin]
bindir:=@bindir@
# system admin executables [EPREFIX/sbin]
sbindir:=@sbindir@
# program executables [EPREFIX/libexec]
libexecdir:=@libexecdir@
# read-only single-machine data [PREFIX/etc]
sysconfdir:=@sysconfdir@
# modifiable architecture-independent data [PREFIX/com]
sharedstatedir:=@sharedstatedir@
# modifiable single-machine data [PREFIX/var]
localstatedir:=@localstatedir@
# modifiable per-process data [LOCALSTATEDIR/run]
runstatedir:=@runstatedir@
# object code libraries [EPREFIX/lib]
libdir:=@libdir@
# C header files [PREFIX/include]
includedir:=@includedir@
# C header files for non-gcc [/usr/include]
oldincludedir:=@oldincludedir@
# read-only arch.-independent data root [PREFIX/share]
datarootdir:=@datarootdir@
# read-only architecture-independent data [DATAROOTDIR]
datadir:=@datadir@
# info documentation [DATAROOTDIR/info]
infodir:=@infodir@
# locale-dependent data [DATAROOTDIR/locale]
localedir:=@localedir@
# man documentation [DATAROOTDIR/man]
mandir:=@mandir@
# documentation root [DATAROOTDIR/doc/thunar-custom-actions]
docdir:=@docdir@
# html documentation [DOCDIR]
htmldir:=@htmldir@
# dvi documentation [DOCDIR]
dvidir:=@dvidir@
# pdf documentation [DOCDIR]
pdfdir:=@pdfdir@
# ps documentation [DOCDIR]
psdir:=@psdir@

# binaries
make_bin:=@make_bin@
xdg_open_bin:=@xdg_open_bin@
convert_bin:=@convert_bin@
su_bin:=@su_bin@
xargs_bin:=@xargs_bin@
find_bin:=@find_bin@
perl_bin:=@perl_bin@
gpg2_bin:=@gpg2_bin@
zenity_bin:=@zenity_bin@
bc_bin:=@bc_bin@
gs_bin:=@gs_bin@
m4_bin:=@m4_bin@
pandoc_bin:=@pandoc_bin@
python3_bin:=@python3_bin@
gettext_bin:=@gettext_bin@
gettextsh_bin:=@gettextsh_bin@
xgettext_bin:=@xgettext_bin@
msgfmt_bin:=@msgfmt_bin@
msgmerge_bin:=@msgmerge_bin@

PACKAGE_VERSION := @PACKAGE_VERSION@
PACKAGE_NAME := @PACKAGE_NAME@
PACKAGE_STRING := @PACKAGE_STRING@

configure_dirs = bindir sbindir libexecdir sysconfdir sharedstatedir \
localstatedir runstatedir libdir includedir oldincludedir datarootdir \
datadir infodir localedir mandir docdir htmldir dvidir pdfdir psdir
configure_vars = $(configure_dirs) \
PACKAGE_VERSION PACKAGE_STRING PACKAGE_NAME PACKAGE_URL \
PASSWDFILE UCAFILE \
make_bin \
xdg_open_bin \
convert_bin \
su_bin \
xargs_bin \
find_bin \
perl_bin \
gpg2_bin \
zenity_bin \
bc_bin \
gs_bin \
m4_bin \
pandoc_bin \
python3_bin \
gettext_bin \
gettextsh_bin \
xgettext_bin \
msgfmt_bin \
msgmerge_bin

$(foreach configure_dir,$(configure_dirs),\
$(eval $(configure_dir) := $(abspath $(DESTDIR)/$($(configure_dir)))))
# $(foreach configure_dir,$(configure_dirs),\
# $(info $(configure_dir) := $($(configure_dir))))

#############################
### The local directories ###
#############################
Expand All @@ -113,9 +8,25 @@ local_mandir = man
local_bindir = bin
local_datarootdir = share
local_localedir = locale
local_includedir = include

local_dirs = $(local_mandir) $(local_bindir) $(local_datarootdir) \
$(local_localedir)
############################################################
### get all the ./configure arguments into this Makefile ###
############################################################
makefile_include:=@makefile_include@
makefile_include_local_path:=$(local_includedir)/@PACKAGE_NAME@/$(makefile_include)
include $(makefile_include_local_path)

# install directory paths from configure
configure_dirs = $(filter %dir,$(configure_vars))
# executable paths from configure
configure_bins = $(filter %_bin,$(configure_vars))
# corresponding local directories
local_dirs = $(foreach directory,$(configure_dirs),$(local_$(directory)))

# merge DESTDIR from dpkg-buildpackage into paths
$(foreach configure_dir,$(configure_dirs),\
$(eval $(configure_dir) := $(abspath $(DESTDIR)/$($(configure_dir)))))

installed_files_file = installed_files.tmp

Expand All @@ -134,7 +45,7 @@ tuca_include_m4 = $(M4_INCL)/tuca.m4
# pandoc options for manpage creation
PANDOCOPTS = -f markdown -t man --standalone

IN_FILES = $(shell $(find_bin) $(local_dirs) $(M4_INCL) -type f -iname '*.in')
IN_FILES = $(shell $(find_bin) $(local_dirs) $(M4_INCL) -type f -iname '*.in' -not -name '$(notdir $(makefile_include_local_path))*')
IN_FILES_INSTANTIATED = $(IN_FILES:.in=)

CONFIGURE_AC = configure.ac
Expand Down Expand Up @@ -172,13 +83,14 @@ $$(eval install_target_dirs = $$(install_target_dirs) $$(dir $$(_target)))
$$(eval install_targets = $$(install_targets) $$(_target))
endef

find_opts = -not -type d -not -iname '*.in'
find_opts = -not -type d -not -iname '*.in' -not -iname '.gitignore'

# define the local content that is to install
local_datarootdir_toinstall = $(shell $(find_bin) $(local_datarootdir) $(find_opts) -not -iname '*.m4')
local_mandir_toinstall = $(GFMANPAGES)
local_localedir_toinstall = $(MOFILES)
local_bindir_toinstall = $(shell $(find_bin) $(local_bindir) $(find_opts))
local_includedir_toinstall = $(shell $(find_bin) $(local_includedir) $(find_opts))

# set up install rules for all configure directories
$(foreach configure_dir,$(configure_dirs),\
Expand Down Expand Up @@ -229,7 +141,7 @@ bin_executable: $(local_bindir_toinstall)
.PHONY: $(install_targets)
install: bin_executable $(sort $(install_targets))
-@sort -u $(installed_files_file) -o $(installed_files_file)

# remove a file/folder without asking
# $(call remove,PATH)
# This is only to display a newline after the command
Expand All @@ -238,24 +150,26 @@ rm -rf $(1)

endef

.PHONY: reset
reset:
$(bindir)/uca-apply remove

.PHONY: uninstall
uninstall: reset
uninstall:
$(foreach file,$(sort $(install_targets) $(shell cat $(installed_files_file))),$(call remove,$(file)))
rm -f $(installed_files_file)
@echo WARNING: There might still be some empty folders left. This should not be a problem.

.PHONY: clean
clean:
rm -rf $(addprefix $(DEBIAN)/,files *.substvars *.debhelper $(PACKAGE_NAME) debhelper-build-stamp *.debhelper.log)
rm -f $(IN_FILES_INSTANTIATED)
rm -f $(UCA_XML_FILES)
rm -f $(GFMANPAGES)
rm -f $(installed_files_file)
rm -f $(only_uca_cmd_file)

.PHONY: debclean
debclean:
rm -rf $(addprefix $(DEBIAN)/,files *.substvars *.debhelper $(PACKAGE_NAME) debhelper-build-stamp *.debhelper.log)

.PHONY: distclean
distclean: clean debclean
rm -f $(makefile_include_local_path)
rm -f Makefile

2 changes: 2 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# instantiated files
uca-apply
72 changes: 6 additions & 66 deletions bin/uca-apply.in
Original file line number Diff line number Diff line change
@@ -1,80 +1,20 @@
#!@make_bin@ -f

# user executables [EPREFIX/bin]
bindir:=@bindir@
# system admin executables [EPREFIX/sbin]
sbindir:=@sbindir@
# program executables [EPREFIX/libexec]
libexecdir:=@libexecdir@
# read-only single-machine data [PREFIX/etc]
sysconfdir:=@sysconfdir@
# modifiable architecture-independent data [PREFIX/com]
sharedstatedir:=@sharedstatedir@
# modifiable single-machine data [PREFIX/var]
localstatedir:=@localstatedir@
# modifiable per-process data [LOCALSTATEDIR/run]
runstatedir:=@runstatedir@
# object code libraries [EPREFIX/lib]
libdir:=@libdir@
# C header files [PREFIX/include]
includedir:=@includedir@
# C header files for non-gcc [/usr/include]
oldincludedir:=@oldincludedir@
# read-only arch.-independent data root [PREFIX/share]
datarootdir:=@datarootdir@
# read-only architecture-independent data [DATAROOTDIR]
datadir:=@datadir@
# info documentation [DATAROOTDIR/info]
infodir:=@infodir@
# locale-dependent data [DATAROOTDIR/locale]
localedir:=@localedir@
# man documentation [DATAROOTDIR/man]
mandir:=@mandir@
# documentation root [DATAROOTDIR/doc/thunar-custom-actions]
docdir:=@docdir@
# html documentation [DOCDIR]
htmldir:=@htmldir@
# dvi documentation [DOCDIR]
dvidir:=@dvidir@
# pdf documentation [DOCDIR]
pdfdir:=@pdfdir@
# ps documentation [DOCDIR]
psdir:=@docdir@

# programs
make_bin:=@make_bin@
xdg_open_bin:=@xdg_open_bin@
find_bin:=@find_bin@
convert_bin:=@convert_bin@
su_bin:=@su_bin@
xargs_bin:=@xargs_bin@
perl_bin:=@perl_bin@
gpg2_bin:=@gpg2_bin@
zenity_bin:=@zenity_bin@
bc_bin:=@bc_bin@
gs_bin:=@gs_bin@
m4_bin:=@m4_bin@
pandoc_bin:=@pandoc_bin@
python3_bin:=@python3_bin@
include $(DESTDIR)/@includedir@/@PACKAGE_NAME@/@makefile_include@

# passwd file
ifeq (@PASSWDFILE@,)
ifeq ($(PASSWDFILE),)
passwdfile:=$(sysconfdir)/passwd
else
passwdfile:=@PASSWDFILE@
passwdfile:=$(PASSWDFILE)
endif
# uca file path
ifeq (@UCAFILE@,)
ifeq ($(UCAFILE),)
ucafile:=.config/Thunar/uca.xml
else
ucafile:=@UCAFILE@
ucafile:=$(UCAFILE)
endif

PACKAGE_VERSION := @PACKAGE_VERSION@
PACKAGE_NAME := @PACKAGE_NAME@
PACKAGE_STRING := @PACKAGE_STRING@

ifeq ($(shell test -e "$(passwdfile)" && echo "yes" || echo "no"),no)
ifeq ($(wildcard $(passwdfile)),)
$(error passwd-file "$(passwdfile)" does not exist)
endif

Expand Down
21 changes: 20 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@ PACKAGE_URL=''

ac_subst_vars='LTLIBOBJS
LIBOBJS
configure_vars
makefile_include
msgmerge_bin
msgfmt_bin
xgettext_bin
Expand Down Expand Up @@ -2684,8 +2686,24 @@ $as_echo "no" >&6; }
fi
# create Makefile input with all output variables from here
makefile_include=configure_vars.mk
makefile_include_local=include/$PACKAGE_NAME/${makefile_include}
mkdir -p $(dirname ${makefile_include}.in)
echo '# generated by autoconf' > ${makefile_include_local}.in # empty file
ac_config_files="$ac_config_files Makefile"
configure_vars=$(echo "$ac_subst_vars" | uniq | perl -pe 's#\s+# #g')
for var in $configure_vars;do
# set the variables in RECURSIVELY EXPANDING mode
echo "$var=@$var@" >> ${makefile_include_local}.in
done
for var in $configure_vars;do
# set the variables in SIMPLE EXPANDING mode
echo "$var:=@$var@" >> ${makefile_include_local}.in
done
ac_config_files="$ac_config_files ${makefile_include_local} Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -3392,6 +3410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"${makefile_include_local}") CONFIG_FILES="$CONFIG_FILES ${makefile_include_local}" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Expand Down
18 changes: 17 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ REQUIRE_PROG([msgmerge],[msgmerge_bin],[program])
# Check for Python modules
AX_PYTHON_MODULE(lxml,fatal,python3)

# create Makefile input with all output variables from here
makefile_include=configure_vars.mk
makefile_include_local=include/$PACKAGE_NAME/${makefile_include}
mkdir -p $(dirname ${makefile_include}.in)
echo '# generated by autoconf' > ${makefile_include_local}.in # empty file
AC_SUBST([makefile_include])
configure_vars=$(echo "$ac_subst_vars" | uniq | perl -pe 's#\s+# #g')
for var in $configure_vars;do
# set the variables in RECURSIVELY EXPANDING mode
echo "$var=@$var@" >> ${makefile_include_local}.in
done
for var in $configure_vars;do
# set the variables in SIMPLE EXPANDING mode
echo "$var:=@$var@" >> ${makefile_include_local}.in
done
AC_SUBST([configure_vars])

AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([${makefile_include_local} Makefile])
AC_OUTPUT
5 changes: 3 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
thunar-custom-actions (0.0.13) UNRELEASED; urgency=medium
thunar-custom-actions (0.0.13) unstable; urgency=medium

* don't force AES256 on gpg symmectric decryption
* structural improvements to reduce redundancies

-- Yann Büchau <nobodyinperson@gmx.de> Sun, 11 Jun 2017 11:04:24 +0200
-- Yann Büchau <nobodyinperson@gmx.de> Sun, 11 Jun 2017 15:27:53 +0200

thunar-custom-actions (0.0.12) unstable; urgency=medium

Expand Down
2 changes: 2 additions & 0 deletions include/thunar-custom-actions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# these files are completely created by ./configure
configure_vars.mk*
2 changes: 2 additions & 0 deletions m4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# instantiated files
tuca.m4
2 changes: 2 additions & 0 deletions share/thunar-custom-actions/system-uca/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore the instantiated xml files
*.xml

0 comments on commit db94949

Please sign in to comment.