diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e35d885 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +_build diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..ade8b43 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,3 @@ +# v1.0.0 + +- Initial release diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/README.md b/README.md index 6f4080f..7b36217 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ -# ocaml-conf-netsnmp -OPAM NetSNMP library dependencies +Virtual package relying on net-snmp libs +======================================== + +Virtual package relying on net-snmp system libraries installation. +This package can only install if the net-snmp lib and development packages +are installed on the system. diff --git a/conf-netsnmp.opam b/conf-netsnmp.opam new file mode 100644 index 0000000..b1bf26d --- /dev/null +++ b/conf-netsnmp.opam @@ -0,0 +1,24 @@ +opam-version: "1.2" +maintainer: "Steve Bleazard " +authors: "Steve Bleazard " +homepage: "https://www.github.com/stevebleazard/ocaml-conf-netsnmp" +bug-reports: "https://www.github.com/stevebleazard/ocaml-conf-netsnmp/issues" +license: "MIT" +dev-repo: "https://www.github.com/stevebleazard/ocaml-conf-netsnmp.git" + +depexts: [ + [["debian"] ["libsnmp-dev"]] + [["ubuntu"] ["libsnmp-dev"]] + [["centos"] ["net-snmp-libs" "net-snmp-devel"]] + [["fedora"] ["net-snmp-libs" "net-snmp-devel"]] + [["opensuse"] ["libsnmp30" "net-snmp-devel"]] + [["alpine"] ["net-snmp-libs" "net-snmp-dev"]] + [["freebsd"] [ ]] + [["openbsd"] [ ]] +] + +build: [ + ["sh" "-exc" "cc -c $CFLAGS -I/usr/local/include files/test.c"] +] + +available: [ os != "darwin" ] diff --git a/descr b/descr new file mode 100644 index 0000000..dc4e241 --- /dev/null +++ b/descr @@ -0,0 +1,3 @@ +Virtual package relying on net-snmp system libraries installation. +This package can only install if the net-snmp lib and development packages +are installed on the system. diff --git a/files/test.c b/files/test.c new file mode 100644 index 0000000..14fb351 --- /dev/null +++ b/files/test.c @@ -0,0 +1,11 @@ +#include +#include + +#ifndef NET_SNMP_MIB_API_H +#error "No NetSNMP header" +#endif + +void test(void) +{ + netsnmp_init_mib(); +} diff --git a/pkg/pkg.ml b/pkg/pkg.ml new file mode 100644 index 0000000..1a04c2b --- /dev/null +++ b/pkg/pkg.ml @@ -0,0 +1,2 @@ +#use "topfind" +#require "topkg-jbuilder.auto"