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:
|
||||
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
|
||||
|
45
Makefile
45
Makefile
@ -30,8 +30,8 @@ dist_archive = $(distdir).tar.bz2
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pck_conf = $(PACKAGE).conf
|
||||
pck_root := $(sort $(patsubst %.in,%,$(wildcard *.in)))
|
||||
pck_confs := $(sort $(patsubst %.in,%,$(wildcard conf/*)))
|
||||
pck_libs := $(sort $(patsubst %.in,%,$(wildcard lib/*)))
|
||||
pck_manpages := $(patsubst %.in,%,$(wildcard man/*.in man/*/*.in))
|
||||
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_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: .in
|
||||
@ -50,7 +50,7 @@ pck_infiles := $(wildcard *.in lib/*.in man/*.in man/*/*.in plugins/*.in templat
|
||||
s,@release@,$(RELEASE),g;\
|
||||
s,@frontend@,$(FRONTEND),g;\
|
||||
s,@pck_lib@,$(PACKAGE_LIB),g;\
|
||||
s,@pck_conf@,$(pck_conf),g;\
|
||||
s,@confdir@,$(confdir),g;\
|
||||
s,@libdir@,$(libdir),g;\
|
||||
s,@sysconfdir@,$(sysconfdir),g;\
|
||||
s,@plugindir@,$(plugindir),g;\
|
||||
@ -63,6 +63,7 @@ all: dist-update locales check
|
||||
|
||||
check: dist-update
|
||||
@echo "Checking libraries and scripts for syntax errors..."
|
||||
@$(MAKE) check -C conf || exit 1
|
||||
@$(MAKE) check -C plugins || exit 1
|
||||
@$(MAKE) check -C tests || exit 1
|
||||
@$(MAKE) check -C tools || exit 1
|
||||
@ -74,13 +75,14 @@ locales:
|
||||
$(MAKE) -C po/$$loc || exit 1;\
|
||||
done
|
||||
|
||||
install-frontend: $(PACKAGE) $(pck_conf)
|
||||
install-frontend: $(PACKAGE)
|
||||
@echo "Installing frontend..."
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_SCRIPT) $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
|
||||
@echo "Installing configuration file..."
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
|
||||
$(INSTALL_DATA) $(pck_conf) $(DESTDIR)$(sysconfdir)/$(pck_conf)
|
||||
|
||||
install-confs: $(pck_confs)
|
||||
@echo "Installing configuration files..."
|
||||
@$(MAKE) install -C conf || exit 1
|
||||
|
||||
install-libs: $(pck_libs)
|
||||
@echo "Installing libraries..."
|
||||
@ -115,6 +117,7 @@ install-tools: $(pck_tools)
|
||||
$(MAKE) install -C tools || exit 1
|
||||
|
||||
install: install-frontend \
|
||||
install-confs \
|
||||
install-libs \
|
||||
install-manpages \
|
||||
install-plugins \
|
||||
@ -126,27 +129,12 @@ install: install-frontend \
|
||||
uninstall:
|
||||
@echo "Uninstalling all the files..."
|
||||
rm -f $(DESTDIR)$(bindir)/$(PACKAGE)
|
||||
rm -f $(DESTDIR)$(sysconfdir)/$(pck_conf)
|
||||
@for f in $(pck_libs); do\
|
||||
echo "rm -f $(DESTDIR)$(libdir)/$${f##*/}";\
|
||||
rm -f $(DESTDIR)$(libdir)/$${f##*/};\
|
||||
done
|
||||
@for f in $(pck_plugins); do\
|
||||
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
|
||||
$(MAKE) install -C conf
|
||||
$(MAKE) install -C lib
|
||||
$(MAKE) install -C plugins
|
||||
$(MAKE) install -C templates
|
||||
$(MAKE) install -C tests
|
||||
$(MAKE) install -C tools
|
||||
@for loc in $(LOCALES); do\
|
||||
$(MAKE) uninstall -C man/$$loc || exit 1;\
|
||||
$(MAKE) uninstall -C po/$$loc || exit 1;\
|
||||
@ -196,6 +184,7 @@ clean: mostlyclean
|
||||
mostlyclean:
|
||||
@echo "Cleaning up unpackaged files..."
|
||||
@rm -f $(pck_root)
|
||||
@$(MAKE) clean -C conf || exit 1
|
||||
@$(MAKE) clean -C lib || exit 1
|
||||
@$(MAKE) clean -C plugins || exit 1
|
||||
@$(MAKE) clean -C templates || exit 1
|
||||
|
@ -19,6 +19,7 @@ sysconfdir = /etc
|
||||
tmpdir = /tmp
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/bin
|
||||
confdir = $(sysconfdir)/autospec.d
|
||||
datadir = $(prefix)/share
|
||||
libdir = $(datadir)/autospec/lib
|
||||
localedir = $(datadir)/locale
|
||||
|
@ -106,10 +106,10 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_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
|
||||
%doc AUTHORS BUGS ChangeLog COPYING NEWS TODO
|
||||
%doc autospec-it-HOWTO
|
||||
%doc %{name}-it-HOWTO
|
||||
|
||||
%files plugins
|
||||
%defattr(-,root,root)
|
||||
@ -117,10 +117,13 @@ make install DESTDIR=%{buildroot} prefix=%{_prefix}
|
||||
%{_bindir}/pck-extract
|
||||
%{_bindir}/pck-update
|
||||
%{_bindir}/spec-create
|
||||
%dir %{_sysconfdir}/%{name}.d
|
||||
%if %{packager_group} == "root"
|
||||
%config %attr(644,root,root) %{_sysconfdir}/%{name}.conf
|
||||
%config %attr(644,root,root) %{_sysconfdir}/%{name}.d/*.conf
|
||||
%else
|
||||
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.conf
|
||||
%config %attr(640,root,%{packager_group}) %{_sysconfdir}/%{name}.d/*.conf
|
||||
%endif
|
||||
%{_datadir}/%{name}/templates/*
|
||||
%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@
|
||||
- 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
|
||||
- update to 1.9.4
|
||||
|
||||
|
@ -18,7 +18,8 @@ TEXTDOMAIN="libcfg"; export TEXTDOMAIN
|
||||
|
||||
# list of the configuration file(s)
|
||||
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
|
||||
function config.check4user() {
|
||||
|
Loading…
Reference in New Issue
Block a user