Skip to content

Commit

Permalink
add debian packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
pippijn committed Sep 6, 2013
1 parent effa544 commit f43b72c
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: c
script:
# run twice, once for bootstrapping
- ocamlbuild -use-ocamlfind merr/merr.native merr/merr.byte
- ocamlbuild -use-ocamlfind merr/merr.native merr/merr.byte
script: dpkg-buildpackage -b -us -uc

install:
- sudo add-apt-repository -y ppa:pippijn/ppa
Expand All @@ -13,3 +10,4 @@ install:
branches:
only:
- master
- /.*\/staging/
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ocaml-merr (0.1) precise; urgency=low

* Initial release. (Closes: #9999)

-- Pippijn van Steenhoven <[email protected]> Fri, 06 Sep 2013 00:59:57 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
47 changes: 47 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Source: ocaml-merr
Section: ocaml
Priority: optional
Maintainer: Pippijn van Steenhoven <[email protected]>
Uploaders:
Pippijn van Steenhoven <[email protected]>
Build-Depends:
ocaml-nox (>= 3.12),
ocaml-findlib,
git,
omake,
libsexplib-camlp4-dev,
dh-ocaml,
debhelper (>= 8.0.0)
Standards-Version: 3.9.2
Homepage: https://github.com/pippijn/merr
Vcs-Git: git://github.com/pippijn/merr
Vcs-Browser: https://github.com/pippijn/merr

Package: merr
Architecture: any
Depends: ${ocaml:Depends}, ${misc:Depends}, ${shlibs:Depends}
Provides: ${ocaml:Provides}
Description: Common library for OCaml projects
This library contains some common modules I use for
most of my projects.
.
This package contains the shared runtime libraries.

Package: libmerr-ocaml
Architecture: any
Depends: ${ocaml:Depends}, ${misc:Depends}, ${shlibs:Depends}
Provides: ${ocaml:Provides}
Description: Common library for OCaml projects
This library contains some common modules I use for
most of my projects.
.
This package contains the shared runtime libraries.

Package: libmerr-ocaml-dev
Architecture: any
Depends: ${ocaml:Depends}, ${misc:Depends}
Provides: ${ocaml:Provides}
Recommends: ocaml-findlib
Description: Common library for OCaml projects
This library contains some common modules I use for
most of my projects.
3 changes: 3 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Files: debian/*
Copyright: (C) 2013 Pippijn van Steenhoven <[email protected]>
License: GPL-3+
3 changes: 3 additions & 0 deletions debian/libmerr-ocaml-dev.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@OCamlStdlibDir@/libmerr/*.a
@OCamlStdlibDir@/libmerr/*.cm[ix]
@OCamlStdlibDir@/libmerr/*.cmxa
3 changes: 3 additions & 0 deletions debian/libmerr-ocaml.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@OCamlStdlibDir@/libmerr/META
@OCamlStdlibDir@/libmerr/*.cma
@OCamlStdlibDir@/libmerr/*.cmxs
3 changes: 3 additions & 0 deletions debian/merr.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/usr/bin/merr
/usr/bin/merr.byte
/usr/bin/merr.native
48 changes: 48 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR = $(CURDIR)/debian/tmp
FLAGS =

include /usr/share/ocaml/ocamlvars.mk

OCAMLFIND_DESTDIR = $(DESTDIR)/$(OCAML_STDLIB_DIR)
export OCAMLFIND_DESTDIR

prefix = /usr

%:
dh --with ocaml $@

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
if [ ! -d obuild ]; then \
git clone --depth=1 https://github.com/pippijn/obuild; \
fi
obuild/script/prepare-tree .

.PHONY: override_dh_auto_build
override_dh_auto_build:
cd obuild && omake

.PHONY: override_dh_auto_test
override_dh_auto_test:
cd obuild && omake check

.PHONY: override_dh_auto_install
override_dh_auto_install:
mkdir -p '$(DESTDIR)$(prefix)/bin'
mkdir -p '$(OCAMLFIND_DESTDIR)'
mkdir -p '$(OCAMLFIND_DESTDIR)/stublibs'
cd obuild && omake install prefix='$(prefix)' DESTDIR='$(DESTDIR)'

.PHONY: override_dh_install
override_dh_install:
dh_install --fail-missing

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
rm -rf obuild

0 comments on commit f43b72c

Please sign in to comment.