---
scribo/ChangeLog | 5 ++++
scribo/Makefile.am | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index d3b3a65..8016953 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * Makefile.am: Add new rules to build rpm and deb packages for
+ Scribo.
+
2010-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
* scribo/primitive/extract/separators_nonvisible.hh: Fix warnings.
diff --git a/scribo/Makefile.am b/scribo/Makefile.am
index 741cca4..2857d57 100644
--- a/scribo/Makefile.am
+++ b/scribo/Makefile.am
@@ -41,3 +41,56 @@ $(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh
scribo headers.mk nodist-headers
include $(srcdir)/headers.mk
+
+
+
+
+# Packaging
+#----------
+
+tmp_inst_dir = scribo_inst.tmp
+tmp_inst_path = $(abs_builddir)/$(tmp_inst_dir)
+
+regen-inst:
+ rm -rf $(tmp_inst_path) \
+ && mkdir $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && mkepmlist --prefix $(bindir) -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(bindir) \
+ > $(top_srcdir)/pkg-aux/scribo_bin_list.inc \
+ && mkepmlist --prefix $(libexecdir) -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(libexecdir) \
+ >> $(top_srcdir)/pkg-aux/scribo_bin_list.inc \
+ && mkepmlist --prefix $(includedir) -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(includedir) \
+ > $(top_srcdir)/pkg-aux/scribo_include_list.inc \
+ && rm -rf $(tmp_inst_path)
+
+
+deb:
+ rm -rf $(tmp_inst_path) \
+ && mkdir $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f deb -n --output-dir $(top_builddir) scribo \
+ $(top_builddir)/pkg-aux/scribo.list \
+ && rm -rf $(tmp_inst_path)
+
+
+rpm:
+ rm -rf $(tmp_inst_path) \
+ && mkdir $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f rpm -n --output-dir $(top_builddir) scribo \
+ $(top_builddir)/pkg-aux/scribo.list \
+ && rm -rf $(tmp_inst_path)
+
+pkg:
+ rm -rf $(tmp_inst_path) \
+ && mkdir $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f rpm -n --output-dir $(top_builddir) scribo \
+ $(top_builddir)/pkg-aux/scribo.list \
+ && epm -v -v -f deb -n --output-dir $(top_builddir) scribo \
+ $(top_builddir)/pkg-aux/scribo.list \
+ && rm -rf $(tmp_inst_path)
+
--
1.5.6.5