Commit c467272f authored by bguillaum's avatar bguillaum

fix config and makefile

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@8492 7838e531-6607-4d57-9587-6c381814729c
parent d65adfc1
name = "libgrew_dev" name = "libgrew@DEV@"
description = "Libgrew" description = "Libgrew"
version = "@VERSION@" version = "@VERSION@"
requires = "" requires = ""
......
...@@ -25,23 +25,18 @@ clean: ...@@ -25,23 +25,18 @@ clean:
@make cleanup @make cleanup
uninstall: uninstall:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
$(OCAMLFIND) remove libgrew > /dev/null $(OCAMLFIND) remove libgrew > /dev/null
uninstall_dev: uninstall_dev:
rm -rf $(OCAMLFIND_DIR)/for_mac_libgrew
$(OCAMLFIND) remove libgrew_dev > /dev/null $(OCAMLFIND) remove libgrew_dev > /dev/null
LIB_DEP = libgrew.cma libgrew.cmxa libgrew.a libgrew.cmi LIB_DEP = libgrew.cma libgrew.cmxa libgrew.a libgrew.cmi
install: uninstall install: uninstall
cp META META_ cp META META_
sed -itmp "s|@VERSION@|$(VERSION)|g" META sed -itmp "s|@VERSION@|$(VERSION)|g" META
sed -itmp "s|@DEV@||g" META
rm -rf METAtmp rm -rf METAtmp
ifneq ($(DESTDIR),)
mkdir -p $(DESTDIR)$(OCAMLFIND_DIR)
touch $(DESTDIR)$(OCAMLFIND_DIR)/for_mac_libgrew
endif
mkdir -p $(DESTDIR)$(DATA_DIR)/ mkdir -p $(DESTDIR)$(DATA_DIR)/
cp data/style.css $(DESTDIR)$(DATA_DIR)/ cp data/style.css $(DESTDIR)$(DATA_DIR)/
cd src && $(OCAMLFIND) install libgrew ../META $(LIB_DEP) cd src && $(OCAMLFIND) install libgrew ../META $(LIB_DEP)
...@@ -49,8 +44,8 @@ endif ...@@ -49,8 +44,8 @@ endif
install_dev: uninstall_dev install_dev: uninstall_dev
cp META META_ cp META META_
sed -itmp "s|@VERSION@|$(VERSION)|g" META sed -itmp "s|@VERSION@|$(VERSION)|g" META
sed -itmp "s|@DEV@|_dev|g" META sed -itmp "s|@DEV@|_dev|g" META
rm -rf METAtmp rm -rf METAtmp
cd src && $(OCAMLFIND) install libgrew_dev ../META $(LIB_DEP) cd src && $(OCAMLFIND) install libgrew_dev ../META $(LIB_DEP)
mv META_ META mv META_ META
...@@ -61,30 +56,3 @@ install_dev: uninstall_dev ...@@ -61,30 +56,3 @@ install_dev: uninstall_dev
doc: doc:
@make -C src doc @make -C src doc
################################################################################
################## PACKAGING ###################################################
################################################################################
targz: clean conf purge_makefile
rm -rf libcaml-grew-$(VERSION)
mkdir -p libcaml-grew-$(VERSION)
cp -r config libcaml-grew-$(VERSION)/
cp configure libcaml-grew-$(VERSION)/
cp Makefile.in libcaml-grew-$(VERSION)/
cp META libcaml-grew-$(VERSION)/
cp -r src libcaml-grew-$(VERSION)/
cp -r data libcaml-grew-$(VERSION)/
cd libcaml-grew-$(VERSION)/ && find . -name .svn -print0 | xargs -0 rm -rf
cd libcaml-grew-$(VERSION)/ && find . -name autom4te.cache -print0 | xargs -0 rm -rf
tar -czvf packaging/libcaml-grew-$(VERSION).tar.gz libcaml-grew-$(VERSION)
rm -rf libcaml-grew-$(VERSION)
portfile: targz
cd packaging && sh create_portfile.sh $(VERSION)
pack_deb: targz
sh packaging/make_deb.sh $(VERSION) $(INSTALL_DIR) $(DATA_DIR) $(DOC_DIR)
...@@ -139,11 +139,6 @@ src/Makefile \ ...@@ -139,11 +139,6 @@ src/Makefile \
src/parser/Makefile \ src/parser/Makefile \
) )
VERSION=`grep "VERSION = .*" config/Makefile.in | sed 's|VERSION = \(.*\)|\1|'`
AC_SUBST(VERSION)
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
echo "" echo ""
echo "Creating Makefiles" echo "Creating Makefiles"
......
...@@ -586,7 +586,6 @@ PACKAGE_URL='' ...@@ -586,7 +586,6 @@ PACKAGE_URL=''
ac_subst_vars='LTLIBOBJS ac_subst_vars='LTLIBOBJS
LIBOBJS LIBOBJS
VERSION
SET_MAKE SET_MAKE
TRUNK TRUNK
INFO INFO
...@@ -1767,7 +1766,7 @@ test -n "$OCAMLC" || OCAMLC="no" ...@@ -1767,7 +1766,7 @@ test -n "$OCAMLC" || OCAMLC="no"
fi fi
for ac_prog in ocamlopt.opt ocamlopt for ac_prog in ocamlopt.opt ocamlopt
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -1810,12 +1809,12 @@ fi ...@@ -1810,12 +1809,12 @@ fi
done done
test -n "$OCAMLOPT" || OCAMLOPT="no" test -n "$OCAMLOPT" || OCAMLOPT="no"
if test "$OCAMLOPT" = no ; then if test "$OCAMLOPT" = no ; then
as_fn_error $? "Cannot find ocamlopt" "$LINENO" 5 as_fn_error $? "Cannot find ocamlopt" "$LINENO" 5
fi fi
for ac_prog in ocamllex.opt ocamllex for ac_prog in ocamllex.opt ocamllex
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -1858,9 +1857,9 @@ fi ...@@ -1858,9 +1857,9 @@ fi
done done
test -n "$OCAMLLEX" || OCAMLLEX="no" test -n "$OCAMLLEX" || OCAMLLEX="no"
if test "$OCAMLLEX" = no ; then if test "$OCAMLLEX" = no ; then
as_fn_error $? "Cannot find ocamllex" "$LINENO" 5 as_fn_error $? "Cannot find ocamllex" "$LINENO" 5
fi fi
# Checks for libraries. # Checks for libraries.
...@@ -2599,11 +2598,6 @@ echo "" ...@@ -2599,11 +2598,6 @@ echo ""
ac_config_files="$ac_config_files config/Makefile Makefile src/Makefile src/parser/Makefile" ac_config_files="$ac_config_files config/Makefile Makefile src/Makefile src/parser/Makefile"
VERSION=`grep "VERSION = .*" config/Makefile.in | sed 's|VERSION = \(.*\)|\1|'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make} set x ${MAKE-make}
......
Package: libcaml-grew
Version: @VERSION@
Section: base
Priority: optional
Architecture: all
Depends: ocaml, libcaml-ansiterminal (=@libcaml-ansiterminal-VERSION@), libcaml-log (=@libcaml-log-VERSION@),libcaml-dep2pict (=@libcaml-dep2pict-VERSION@), menhir
Maintainer: Paul MASSON <paul.masson@loria.fr>
Description: LibGrew is an OCaml library prototype for graph rewriting
#! /bin/sh
cd /tmp/libcaml-grew
tar -xf libcaml-grew-@VERSION@.tar.gz
cd libcaml-grew-@VERSION@
./configure > log.install
make >> log.install
make uninstall >> log.install
make install >> log.install
cd ..
rm -rf libcaml-grew-@VERSION@
#! /bin/bash
ocamlfind remove libgrew > /dev/null
#! /bin/sh
VERSION=$1
md5=`openssl md5 libcaml-grew-$VERSION.tar.gz | sed "s|MD5(libcaml-grew-$VERSION\.tar.gz)= ||"`
sha1=`openssl sha1 libcaml-grew-$VERSION.tar.gz | sed "s|SHA1(libcaml-grew-$VERSION\.tar.gz)= ||"`
rmd160=`openssl rmd160 libcaml-grew-$VERSION.tar.gz | sed "s|RIPEMD160(libcaml-grew-$VERSION\.tar.gz)= ||"`
cp default_portfile/Portfile.default Portfile
sed -i "s|@MD5_SUM@|$md5|" Portfile
sed -i "s|@SHA1_SUM@|$sha1|" Portfile
sed -i "s|@RMD160_SUM@|$rmd160|" Portfile
sed -i "s|@VERSION@|$VERSION|" Portfile
PortSystem 1.0
name libcaml-grew
version @VERSION@
categories textproc
platforms darwin
maintainers inria.fr:paul.masson
description LibGrew : Ocaml prototype for graph rewriting
long_description Ocaml prototype for graph rewriting
homepage http://wikilligramme.loria.fr
master_sites http://wikilligramme.loria.fr/macport/@repos@/archive/libcaml-grew
checksums md5 @MD5_SUM@ \
sha1 @SHA1_SUM@ \
rmd160 @RMD160_SUM@
depends_build port:ocaml \
port:libcaml-ansiterminal \
port:libcaml-dep2pict \
port:libcaml-log \
port:ocaml-menhir
use_parallel_build no
#! /bin/sh
VERSION=$1
INSTALL_DIR=$2
DATA_DIR=$3
DOC_DIR=$4
rm -rf packaging/libcaml-grew*.deb
mkdir -p packaging/deb/DEBIAN/
mkdir -p packaging/deb/tmp/libcaml-grew/
cp packaging/libcaml-grew-$VERSION.tar.gz packaging/deb/tmp/libcaml-grew/
size="0"
cp packaging/DEBIAN/control packaging/deb/DEBIAN/control
cp packaging/DEBIAN/postinst packaging/deb/DEBIAN/postinst
cp packaging/DEBIAN/postrm packaging/deb/DEBIAN/postrm
chmod 755 packaging/deb/DEBIAN/postrm
chmod 755 packaging/deb/DEBIAN/postinst
sed -i "s|@VERSION@|$VERSION|" packaging/deb/DEBIAN/control
sed -i "s|@SIZE@|$size|" packaging/deb/DEBIAN/control
sed -i "s|@VERSION@|$VERSION|" packaging/deb/DEBIAN/postinst
(cd packaging/ && dpkg-deb --build deb && cd -) || (echo "Fatal error : maybe the version number is null (make ... VERSION=...)" && exit 1)
mv packaging/deb.deb packaging/libcaml-grew-$VERSION.deb
rm -rf packaging/deb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment