aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Makefile11
-rw-r--r--rpm-helper.macros.in39
-rw-r--r--rpm-helper.spec9
4 files changed, 59 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 04ed0ad..ae05e05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/Makefile b/Makefile
index 6433b58..d8b25bd 100644
--- a/Makefile
+++ b/Makefile
@@ -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