Initial import.

This commit is contained in:
Ben Rosser 2018-11-27 04:29:52 -05:00
parent 9124d21567
commit ccb4427d63
4 changed files with 161 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.rpm
/lwt-log-1.1.0.tar.gz

68
lwt-log-fsf-address.patch Normal file
View File

@ -0,0 +1,68 @@
diff -rupN lwt_log-1.1.0/src/core/lwt_log_core.mli lwt_log-patched/src/core/lwt_log_core.mli
--- lwt_log-1.1.0/src/core/lwt_log_core.mli 2018-03-30 10:46:06.000000000 -0400
+++ lwt_log-patched/src/core/lwt_log_core.mli 2018-11-22 18:15:43.138000175 -0500
@@ -14,10 +14,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
(** Logging facility *)
diff -rupN lwt_log-1.1.0/src/core/lwt_log_rules.mli lwt_log-patched/src/core/lwt_log_rules.mli
--- lwt_log-1.1.0/src/core/lwt_log_rules.mli 2018-03-30 10:46:06.000000000 -0400
+++ lwt_log-patched/src/core/lwt_log_rules.mli 2018-11-22 18:16:38.627702785 -0500
@@ -13,10 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
(** Logging rules parsing *)
diff -rupN lwt_log-1.1.0/src/unix/lwt_daemon.mli lwt_log-patched/src/unix/lwt_daemon.mli
--- lwt_log-1.1.0/src/unix/lwt_daemon.mli 2018-03-30 10:46:06.000000000 -0400
+++ lwt_log-patched/src/unix/lwt_daemon.mli 2018-11-22 18:16:41.971731957 -0500
@@ -13,10 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
(** Daemon helpers *)
diff -rupN lwt_log-1.1.0/src/unix/lwt_log.mli lwt_log-patched/src/unix/lwt_log.mli
--- lwt_log-1.1.0/src/unix/lwt_log.mli 2018-03-30 10:46:06.000000000 -0400
+++ lwt_log-patched/src/unix/lwt_log.mli 2018-11-22 18:16:46.863774633 -0500
@@ -14,10 +14,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
(** Logging functions

90
ocaml-lwt-log.spec Normal file
View File

@ -0,0 +1,90 @@
Name: ocaml-lwt-log
Version: 1.1.0
Release: 2%{?dist}
Summary: Lwt logging library
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
License: LGPLv2+
URL: https://github.com/ocsigen/lwt_log
Source0: https://github.com/ocsigen/lwt_log/archive/%{version}/%{libname}-%{version}.tar.gz
# Fix FSF addresses in some header files.
Patch0: lwt-log-fsf-address.patch
BuildRequires: ocaml
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-lwt-devel
BuildRequires: jbuilder
%description
Lwt-friendly logging library.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%autosetup -n lwt_log-%{version} -p1
%build
%make_build
%install
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
jbuilder install --prefix %{buildroot}%{_prefix}
# Remove .ml files.
rm -rf %{buildroot}%{_libdir}/ocaml/lwt_log/*.ml
rm -rf %{buildroot}%{_libdir}/ocaml/lwt_log/*/*.ml
# Hmm... the above needs refinement. Remove spurious doc files.
rm -rf %{buildroot}%{_prefix}/doc
# Makes *.cmxs executable such that they will be stripped.
# This will cause debuginfo to be generated!
find %{buildroot} -name '*.cmxs' -exec chmod 0755 {} \;
%files
%license COPYING
%doc README.md CHANGES
%{_libdir}/ocaml/lwt_log
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/lwt_log/*.a
%exclude %{_libdir}/ocaml/lwt_log/*.cmxa
%exclude %{_libdir}/ocaml/lwt_log/*.cmx
%exclude %{_libdir}/ocaml/lwt_log/*/*.a
%exclude %{_libdir}/ocaml/lwt_log/*/*.cmxa
%exclude %{_libdir}/ocaml/lwt_log/*/*.cmx
%endif
%exclude %{_libdir}/ocaml/*/*.mli
%exclude %{_libdir}/ocaml/lwt_log/*/*.mli
%files devel
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmxa
%{_libdir}/ocaml/*/*.cmx
%{_libdir}/ocaml/lwt_log/*/*.a
%{_libdir}/ocaml/lwt_log/*/*.cmxa
%{_libdir}/ocaml/lwt_log/*/*.cmx
%endif
%{_libdir}/ocaml/*/*.mli
%{_libdir}/ocaml/lwt_log/*/*.mli
%changelog
* Thu Nov 22 2018 Ben Rosser <rosser.bjr@gmail.com> - 1.1.0-2
- Mark cmxs files as executable to generate debuginfo.
- Correct license (it's LGPLv2+, not BSD).
- Remove license from devel package.
- Fix FSF address in mli header files.
* Tue Oct 16 2018 Ben Rosser <rosser.bjr@gmail.com> - 1.1.0-1
- Initial packaging.

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (lwt-log-1.1.0.tar.gz) = fa0ce2928912b55ecbddc14ecd6f6d5db399f7cd6cba5f38d61db4c89ab7345d3e42f8f1292d9a5be973e16fd43d8381d6c269ae47f3692bb64ff567a7039451