---
milena/ChangeLog | 5 +++++
milena/Makefile.am | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f858b7e..f16ccdc 100644
--- a/milena/ChangeLog
+++ b/milena/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
+ Milena.
+
2010-08-26 Guillaume Lazzara <z(a)lrde.epita.fr>
* mln/labeling/compute.hh: Add a missing overload in dispatch.
diff --git a/milena/Makefile.am b/milena/Makefile.am
index bac240d..a12aedc 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -110,3 +110,54 @@ EXTRA_DIST += \
tests/img/test_rgb8.tif \
tests/img/test_bw.tif \
tests/img/test_gl.tif
+
+
+
+# Packaging
+#----------
+
+tmp_inst_dir = milena_inst.tmp
+tmp_inst_path = $(abs_builddir)/$(tmp_inst_dir)
+
+regen-inst:
+ rm -rf $(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/milena_bin_list.inc \
+ && mkepmlist --prefix $(datarootdir)/olena -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(datarootdir)/olena \
+ >> $(top_srcdir)/pkg-aux/milena_bin_list.inc \
+ && mkepmlist --prefix $(datarootdir)/doc -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(datarootdir)/doc \
+ > $(top_srcdir)/pkg-aux/milena_doc_list.inc \
+ && mkepmlist --prefix $(includedir) -g sys -u root \
+ $(builddir)/$(tmp_inst_dir)/$(includedir) \
+ > $(top_srcdir)/pkg-aux/milena_include_list.inc \
+ && rm -rf $(tmp_inst_path)
+
+
+deb:
+ rm -rf $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f deb -n --output-dir $(top_builddir) milena \
+ $(top_builddir)/pkg-aux/milena.list \
+ && rm -rf $(tmp_inst_path)
+
+
+rpm:
+ rm -rf $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f rpm -n --output-dir $(top_builddir) milena \
+ $(top_builddir)/pkg-aux/milena.list \
+ && rm -rf $(tmp_inst_path)
+
+pkg:
+ rm -rf $(tmp_inst_path) \
+ && $(MAKE) DESTDIR=$(tmp_inst_path) install \
+ && epm -v -v -f rpm -n --output-dir $(top_builddir) milena \
+ $(top_builddir)/pkg-aux/milena.list \
+ && epm -v -v -f deb -n --output-dir $(top_builddir) milena \
+ $(top_builddir)/pkg-aux/milena.list \
+ && rm -rf $(tmp_inst_path)
+
--
1.5.6.5