Split autospec.conf into several configuration files
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
4f44b8b825
commit
55bfa01730
@ -19,6 +19,12 @@ Changes in version 1.10.1
|
|||||||
* po/it/pck-update.po - Davide Madrisan:
|
* po/it/pck-update.po - Davide Madrisan:
|
||||||
Updated.
|
Updated.
|
||||||
|
|
||||||
|
* lib/libcfg.lib - Davide Madrisan:
|
||||||
|
Add /etc/autospec.d/*.conf to the list of configuration files.
|
||||||
|
|
||||||
|
* Makefile, Makefile.env, conf/* - Davide Madrisan:
|
||||||
|
Split autospec.conf into several configuration files.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.10.0
|
Changes in version 1.10.0
|
||||||
|
45
Makefile
45
Makefile
@ -30,8 +30,8 @@ dist_archive = $(distdir).tar.bz2
|
|||||||
|
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
|
|
||||||
pck_conf = $(PACKAGE).conf
|
|
||||||
pck_root := $(sort $(patsubst %.in,%,$(wildcard *.in)))
|
pck_root := $(sort $(patsubst %.in,%,$(wildcard *.in)))
|
||||||
|
pck_confs := $(sort $(patsubst %.in,%,$(wildcard conf/*)))
|
||||||
pck_libs := $(sort $(patsubst %.in,%,$(wildcard lib/*)))
|
pck_libs := $(sort $(patsubst %.in,%,$(wildcard lib/*)))
|
||||||
pck_manpages := $(patsubst %.in,%,$(wildcard man/*.in man/*/*.in))
|
pck_manpages := $(patsubst %.in,%,$(wildcard man/*.in man/*/*.in))
|
||||||
pck_plugins := $(sort $(patsubst %.in,%,$(wildcard plugins/*)))
|
pck_plugins := $(sort $(patsubst %.in,%,$(wildcard plugins/*)))
|
||||||
@ -39,7 +39,7 @@ pck_templates := $(sort $(patsubst %.in,%,$(wildcard templates/*)))
|
|||||||
pck_tests := $(sort $(patsubst %.in,%,$(wildcard tests/*)))
|
pck_tests := $(sort $(patsubst %.in,%,$(wildcard tests/*)))
|
||||||
pck_tools := $(sort $(patsubst %.in,%,$(wildcard tools/*)))
|
pck_tools := $(sort $(patsubst %.in,%,$(wildcard tools/*)))
|
||||||
|
|
||||||
pck_infiles := $(wildcard *.in lib/*.in man/*.in man/*/*.in plugins/*.in templates/.in tests/* tools/*.in)
|
pck_infiles := $(wildcard *.in conf/*.in lib/*.in man/*.in man/*/*.in plugins/*.in templates/.in tests/* tools/*.in)
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .in
|
.SUFFIXES: .in
|
||||||
@ -50,7 +50,7 @@ pck_infiles := $(wildcard *.in lib/*.in man/*.in man/*/*.in plugins/*.in templat
|
|||||||
s,@release@,$(RELEASE),g;\
|
s,@release@,$(RELEASE),g;\
|
||||||
s,@frontend@,$(FRONTEND),g;\
|
s,@frontend@,$(FRONTEND),g;\
|
||||||
s,@pck_lib@,$(PACKAGE_LIB),g;\
|
s,@pck_lib@,$(PACKAGE_LIB),g;\
|
||||||
s,@pck_conf@,$(pck_conf),g;\
|
s,@confdir@,$(confdir),g;\
|
||||||
s,@libdir@,$(libdir),g;\
|
s,@libdir@,$(libdir),g;\
|
||||||
s,@sysconfdir@,$(sysconfdir),g;\
|
s,@sysconfdir@,$(sysconfdir),g;\
|
||||||
s,@plugindir@,$(plugindir),g;\
|
s,@plugindir@,$(plugindir),g;\
|
||||||
@ -63,6 +63,7 @@ all: dist-update locales check
|
|||||||
|
|
||||||
check: dist-update
|
check: dist-update
|
||||||
@echo "Checking libraries and scripts for syntax errors..."
|
@echo "Checking libraries and scripts for syntax errors..."
|
||||||
|
@$(MAKE) check -C conf || exit 1
|
||||||
@$(MAKE) check -C plugins || exit 1
|
@$(MAKE) check -C plugins || exit 1
|
||||||
@$(MAKE) check -C tests || exit 1
|
@$(MAKE) check -C tests || exit 1
|
||||||
@$(MAKE) check -C tools || exit 1
|
@$(MAKE) check -C tools || exit 1
|
||||||
@ -74,13 +75,14 @@ locales:
|
|||||||
$(MAKE) -C po/$$loc || exit 1;\
|
$(MAKE) -C po/$$loc || exit 1;\
|
||||||
done
|
done
|
||||||
|
|
||||||
install-frontend: $(PACKAGE) $(pck_conf)
|
install-frontend: $(PACKAGE)
|
||||||
@echo "Installing frontend..."
|
@echo "Installing frontend..."
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_SCRIPT) $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
|
$(INSTALL_SCRIPT) $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
|
||||||
@echo "Installing configuration file..."
|
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
|
install-confs: $(pck_confs)
|
||||||
$(INSTALL_DATA) $(pck_conf) $(DESTDIR)$(sysconfdir)/$(pck_conf)
|
@echo "Installing configuration files..."
|
||||||
|
@$(MAKE) install -C conf || exit 1
|
||||||
|
|
||||||
install-libs: $(pck_libs)
|
install-libs: $(pck_libs)
|
||||||
@echo "Installing libraries..."
|
@echo "Installing libraries..."
|
||||||
@ -115,6 +117,7 @@ install-tools: $(pck_tools)
|
|||||||
$(MAKE) install -C tools || exit 1
|
$(MAKE) install -C tools || exit 1
|
||||||
|
|
||||||
install: install-frontend \
|
install: install-frontend \
|
||||||
|
install-confs \
|
||||||
install-libs \
|
install-libs \
|
||||||
install-manpages \
|
install-manpages \
|
||||||
install-plugins \
|
install-plugins \
|
||||||
@ -126,27 +129,12 @@ install: install-frontend \
|
|||||||
uninstall:
|
uninstall:
|
||||||
@echo "Uninstalling all the files..."
|
@echo "Uninstalling all the files..."
|
||||||
rm -f $(DESTDIR)$(bindir)/$(PACKAGE)
|
rm -f $(DESTDIR)$(bindir)/$(PACKAGE)
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/$(pck_conf)
|
$(MAKE) install -C conf
|
||||||
@for f in $(pck_libs); do\
|
$(MAKE) install -C lib
|
||||||
echo "rm -f $(DESTDIR)$(libdir)/$${f##*/}";\
|
$(MAKE) install -C plugins
|
||||||
rm -f $(DESTDIR)$(libdir)/$${f##*/};\
|
$(MAKE) install -C templates
|
||||||
done
|
$(MAKE) install -C tests
|
||||||
@for f in $(pck_plugins); do\
|
$(MAKE) install -C tools
|
||||||
echo "rm -f $(DESTDIR)$(plugindir)/$${f##*/}";\
|
|
||||||
rm -f $(DESTDIR)$(plugindir)/$${f##*/};\
|
|
||||||
done
|
|
||||||
@for f in $(pck_templates); do\
|
|
||||||
echo "rm -f $(DESTDIR)$(templatedir)/$${f##*/}";\
|
|
||||||
rm -f $(DESTDIR)$(templatedir)/$${f##*/};\
|
|
||||||
done
|
|
||||||
@for f in $(pck_tests); do\
|
|
||||||
echo "rm -f $(DESTDIR)$(testdir)/$${f##*/}";\
|
|
||||||
rm -f $(DESTDIR)$(testdir)/$${f##*/};\
|
|
||||||
done
|
|
||||||
@for f in $(pck_tools); do\
|
|
||||||
echo "rm -f $(DESTDIR)$(tooldir)/$${f##*/}";\
|
|
||||||
rm -f $(DESTDIR)$(tooldir)/$${f##*/};\
|
|
||||||
done
|
|
||||||
@for loc in $(LOCALES); do\
|
@for loc in $(LOCALES); do\
|
||||||
$(MAKE) uninstall -C man/$$loc || exit 1;\
|
$(MAKE) uninstall -C man/$$loc || exit 1;\
|
||||||
$(MAKE) uninstall -C po/$$loc || exit 1;\
|
$(MAKE) uninstall -C po/$$loc || exit 1;\
|
||||||
@ -196,6 +184,7 @@ clean: mostlyclean
|
|||||||
mostlyclean:
|
mostlyclean:
|
||||||
@echo "Cleaning up unpackaged files..."
|
@echo "Cleaning up unpackaged files..."
|
||||||
@rm -f $(pck_root)
|
@rm -f $(pck_root)
|
||||||
|
@$(MAKE) clean -C conf || exit 1
|
||||||
@$(MAKE) clean -C lib || exit 1
|
@$(MAKE) clean -C lib || exit 1
|
||||||
@$(MAKE) clean -C plugins || exit 1
|
@$(MAKE) clean -C plugins || exit 1
|
||||||
@$(MAKE) clean -C templates || exit 1
|
@$(MAKE) clean -C templates || exit 1
|
||||||
|
@ -19,6 +19,7 @@ sysconfdir = /etc
|
|||||||
tmpdir = /tmp
|
tmpdir = /tmp
|
||||||
exec_prefix = $(prefix)
|
exec_prefix = $(prefix)
|
||||||
bindir = $(exec_prefix)/bin
|
bindir = $(exec_prefix)/bin
|
||||||
|
confdir = $(sysconfdir)/autospec.d
|
||||||
datadir = $(prefix)/share
|
datadir = $(prefix)/share
|
||||||
libdir = $(datadir)/autospec/lib
|
libdir = $(datadir)/autospec/lib
|
||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
|
@ -106,10 +106,10 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%lang(it) %{_mandir}/it/man1/autospec.*
|
%lang(it) %{_mandir}/it/man1/%{name}.*
|
||||||
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/autospec_fe.mo
|
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/autospec_fe.mo
|
||||||
%doc AUTHORS BUGS ChangeLog COPYING NEWS TODO
|
%doc AUTHORS BUGS ChangeLog COPYING NEWS TODO
|
||||||
%doc autospec-it-HOWTO
|
%doc %{name}-it-HOWTO
|
||||||
|
|
||||||
%files plugins
|
%files plugins
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -117,10 +117,13 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
|
|||||||
%{_bindir}/pck-extract
|
%{_bindir}/pck-extract
|
||||||
%{_bindir}/pck-update
|
%{_bindir}/pck-update
|
||||||
%{_bindir}/spec-create
|
%{_bindir}/spec-create
|
||||||
|
%dir %{_sysconfdir}/%{name}.d
|
||||||
%if %{packager_group} == "root"
|
%if %{packager_group} == "root"
|
||||||
%config %attr(644,root,root) %{_sysconfdir}/%{name}.conf
|
%config %attr(644,root,root) %{_sysconfdir}/%{name}.conf
|
||||||
|
%config %attr(644,root,root) %{_sysconfdir}/%{name}.d/*.conf
|
||||||
%else
|
%else
|
||||||
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.conf
|
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.conf
|
||||||
|
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.d/*.conf
|
||||||
%endif
|
%endif
|
||||||
%{_datadir}/%{name}/templates/*
|
%{_datadir}/%{name}/templates/*
|
||||||
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/config-getvar.mo
|
%lang(it) %{?_localedir:%{_localedir}}%{!?_localedir:%_datadir/locale}/it/LC_MESSAGES/config-getvar.mo
|
||||||
@ -147,6 +150,9 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
|
|||||||
* @date@ Davide Madrisan <davide.madrisan@gmail.com> @version@-@release@
|
* @date@ Davide Madrisan <davide.madrisan@gmail.com> @version@-@release@
|
||||||
- update to @version@
|
- update to @version@
|
||||||
|
|
||||||
|
* Mon May 01 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.10.0-1mamba
|
||||||
|
- update to 1.10.0
|
||||||
|
|
||||||
* Wed Apr 18 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.9.4-1mamba
|
* Wed Apr 18 2012 Davide Madrisan <davide.madrisan@gmail.com> 1.9.4-1mamba
|
||||||
- update to 1.9.4
|
- update to 1.9.4
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ TEXTDOMAIN="libcfg"; export TEXTDOMAIN
|
|||||||
|
|
||||||
# list of the configuration file(s)
|
# list of the configuration file(s)
|
||||||
default_cfg=(\
|
default_cfg=(\
|
||||||
`ls /etc/@package@.conf ~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
|
`ls /etc/@package@.conf /etc/@package@.d/*.conf \
|
||||||
|
~/.@package@ ~/.@package@.d/*.conf 2>/dev/null`)
|
||||||
|
|
||||||
# check if the user configurations file for autospec is present
|
# check if the user configurations file for autospec is present
|
||||||
function config.check4user() {
|
function config.check4user() {
|
||||||
|
Loading…
Reference in New Issue
Block a user