diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2005-06-30 08:33:08 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2005-06-30 08:33:08 +0000 |
commit | 9355004b895406353a6d1018d16918ac608e4271 (patch) | |
tree | 9f5fba4ce03ec324ec304cf103025b7973d372c2 | |
parent | 4fcdb3aec25062c621382b6e2666ce24c54c2463 (diff) | |
download | rpm-helper-9355004b895406353a6d1018d16918ac608e4271.tar rpm-helper-9355004b895406353a6d1018d16918ac608e4271.tar.gz rpm-helper-9355004b895406353a6d1018d16918ac608e4271.tar.bz2 rpm-helper-9355004b895406353a6d1018d16918ac608e4271.tar.xz rpm-helper-9355004b895406353a6d1018d16918ac608e4271.zip |
- make rpm-helper provide itself its macros
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | rpm-helper.macros.in | 39 | ||||
-rw-r--r-- | rpm-helper.spec | 9 |
4 files changed, 59 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2005-03-09 21:11 Frederic Lepied <flepied@mandrakesoft.com> + + * .cvsignore: first version + 2004-09-23 03:03 Frederic Lepied <flepied@mandrakesoft.com> * rpm-helper.spec: 0.10-1mdk @@ -13,11 +13,15 @@ RELEASE := $(shell rpm -q --qf %{RELEASE} --specfile $(PACKAGE).spec) TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') FILES = AUTHORS README README.CVS COPYING ChangeLog Makefile \ - $(PACKAGE).spec $(SCRIPTS) + $(PACKAGE).spec $(SCRIPTS) $(MACROFILEIN) SCRIPTS = add-user del-user add-service del-service create-file \ add-group del-group add-shell del-shell verify-shell -LIBDIR=/usr/share/rpm-helper +LIBDIR=/usr/share/$(PACKAGE) +RPMACROSDIR=/etc/rpm/macros.d + +MACROFILEIN = $(PACKAGE).macros.in +MACROFILE = $(MACROFILEIN:.in=) all: @echo "done" @@ -28,6 +32,9 @@ clean: install: -mkdir -p $(DESTDIR)$(LIBDIR) cp -p $(SCRIPTS) $(DESTDIR)$(LIBDIR) + -mkdir -p $(DESTDIR)$(RPMACROSDIR) + cat $(MACROFILEIN) | \ + sed 's,@LIBDIR@,$(LIBDIR),g' > $(DESTDIR)$(RPMACROSDIR)/$(MACROFILE) version: @echo "$(VERSION)-$(RELEASE)" diff --git a/rpm-helper.macros.in b/rpm-helper.macros.in new file mode 100644 index 0000000..3de893c --- /dev/null +++ b/rpm-helper.macros.in @@ -0,0 +1,39 @@ +# $Id$ + +%_create_ghostfile_helper @LIBDIR@/create-file +%create_ghostfile() %_create_ghostfile_helper %{name} $1 %{1} %{2} %{3} %{4} \ +%{nil} + +# initscripts macros +%_add_service_helper @LIBDIR@/add-service +%_post_service() %_add_service_helper %{name} $1 %{1} \ +%{nil} + +%_del_service_helper @LIBDIR@/del-service +%_preun_service() %_del_service_helper %{name} $1 %{1} \ +%{nil} + +%_add_user_helper @LIBDIR@/add-user +%_pre_useradd() %_add_user_helper %{name} $1 %{1} %{2} %{3} \ +%{nil} + +%_del_user_helper @LIBDIR@/del-user +%_postun_userdel() %_del_user_helper %{name} $1 %{1} \ +%{nil} + +%_add_group_helper @LIBDIR@/add-group +%_pre_groupadd() %_add_group_helper %{name} $1 %{1} %{?2:%2} \ +%{nil} + +%_del_group_helper @LIBDIR@/del-group +%_postun_groupdel() %_del_group_helper %{name} $1 %{1} \ +%{nil} + +%_add_shell_helper @LIBDIR@/add-shell +%_post_shelladd() %_add_shell_helper %{name} $1 %{1} \ +%{nil} + +%_del_shell_helper @LIBDIR@/del-shell +%_preun_shelldel() %_del_shell_helper %{name} $1 \ +%{nil} + diff --git a/rpm-helper.spec b/rpm-helper.spec index 64cd27b..ba4bb56 100644 --- a/rpm-helper.spec +++ b/rpm-helper.spec @@ -10,8 +10,8 @@ Summary: Helper scripts for rpm scriptlets Name: rpm-helper -Version: 0.10 -Release: 1mdk +Version: 0.11 +Release: %mkrel 1 Source0: %name-%version.tar.bz2 License: GPL Group: System/Configuration/Packaging @@ -44,8 +44,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc README* ChangeLog AUTHORS %_datadir/%name +%_sys_macros_dir/%name.macros %changelog +* Thu Jun 30 2005 Olivier Thauvin <nanardon@mandriva.org> 0.11-1mdk +- provide itself its macro (rpm 4.4 powah) +- mkrel + * Thu Sep 23 2004 Frederic Lepied <flepied@mandrakesoft.com> 0.10-1mdk - add-service: add the service again on upgrade if the service is activated |