summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--libxlswriter.spec122
3 files changed, 135 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f69818
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.bz2
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/libxlswriter.spec b/libxlswriter.spec
new file mode 100644
index 0000000..75d83ca
--- /dev/null
+++ b/libxlswriter.spec
@@ -0,0 +1,122 @@
+# remirepo/fedora spec file for libxlswriter
+#
+# Copyright (c) 2018 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global gh_commit f21770c1cd87d9f266d5dea882bcbe62ead4d03c
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner jmcnamara
+%global gh_project libxlsxwriter
+%global libname %{gh_project}
+
+Name: %{libname}
+Summary: A C library for creating Excel XLSX files
+Version: 0.7.6
+Release: 1%{?dist}
+License: BSD
+Group: System Environment/Libraries
+
+URL: https://github.com/%{gh_owner}/%{gh_project}/
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+
+BuildRequires: gcc
+# see https://github.com/jmcnamara/libxlsxwriter/issues/168
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+BuildRequires: cmake3
+%else
+BuildRequires: cmake >= 2.8.7
+%endif
+BuildRequires: zlib-devel
+
+
+
+%description
+Libxlsxwriter is a C library that can be used to write text, numbers, formulas
+and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.
+
+It supports features such as:
+
+* 100% compatible Excel XLSX files.
+* Full Excel formatting.
+* Merged cells.
+* Defined names.
+* Autofilters.
+* Charts.
+* Data validation and drop down lists.
+* Worksheet PNG/JPEG images.
+* Memory optimization mode for writing large files.
+* Source code available on GitHub.
+* FreeBSD license.
+* ANSI C.
+* Works with GCC, Clang, Xcode, MSVC 2015, ICC, TCC, MinGW, MingGW-w64/32.
+* Works on Linux, FreeBSD, OpenBSD, OS X, iOS and Windows.
+ Also works on MSYS/MSYS2 and Cygwin.
+* Compiles for 32 and 64 bit.
+* Compiles and works on big and little endian systems.
+* The only dependency is on zlib.
+
+
+%package devel
+Summary: Header files and development libraries for %{name}
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the header files and development libraries
+for %{name}.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+# Fix Layout - see https://github.com/jmcnamara/libxlsxwriter/issues/166
+sed -e '/DESTINATION/s/ lib/ %{_lib}/' -i CMakeLists.txt
+
+
+%build
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+%cmake3 -DBUILD_TESTS=ON
+%else
+%cmake -DBUILD_TESTS=ON
+%endif
+
+make %{_smp_mflags}
+
+
+%check
+make test
+
+
+%install
+make install DESTDIR="%{buildroot}"
+
+
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+%endif
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license License.txt
+%{_libdir}/%{libname}.so
+
+
+%files devel
+%doc *.md
+%doc Changes.txt
+%doc examples
+%{_includedir}/xls*
+
+
+%changelog
+* Fri Apr 27 2018 Remi Collet <remi@remirepo.net> - 0.7.6-1
+- initial package
+- open https://github.com/jmcnamara/libxlsxwriter/issues/166 library layout
+- open https://github.com/jmcnamara/libxlsxwriter/issues/167 soname
+- open https://github.com/jmcnamara/libxlsxwriter/issues/168 cmake version