summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--dlib.spec117
3 files changed, 130 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.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/dlib.spec b/dlib.spec
new file mode 100644
index 0000000..534c765
--- /dev/null
+++ b/dlib.spec
@@ -0,0 +1,117 @@
+# remirepo/fedora spec file for dlib
+#
+# Copyright (c) 2020 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global gh_commit 5612caa16937b5b81eb2dba17c20e303537a6a9d
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner davisking
+%global gh_project dlib
+%global libname lib%{gh_project}
+%global soname 19
+
+Name: %{gh_project}
+Summary: A toolkit for making real world machine learning and data analysis
+Version: 19.20
+Release: 1%{?dist}
+License: Boost
+
+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
+
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+BuildRequires: cmake3
+BuildRequires: devtoolset-6-toolchain
+%else
+BuildRequires: cmake
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: libstdc++-devel
+%endif
+BuildRequires: openblas-devel
+BuildRequires: libpng-devel
+BuildRequires: libtiff-devel
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: giflib-devel
+BuildRequires: sqlite-devel
+BuildRequires: libXext-devel
+
+
+%description
+Dlib is a modern C++ toolkit containing machine learning algorithms and tools
+for creating complex software in C++ to solve real world problems.
+
+See http://dlib.net for the main project documentation and API reference.
+
+
+%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 %{libname}.
+
+
+%prep
+%setup -q -n %{gh_project}-%{gh_commit}
+
+
+%build
+mkdir build
+cd build
+
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+source /opt/rh/devtoolset-6/enable
+
+%cmake3 \
+%else
+%cmake \
+%endif
+ ..
+
+make %{_smp_mflags}
+
+
+%install
+cd build
+
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+source /opt/rh/devtoolset-6/enable
+%endif
+
+make install DESTDIR="%{buildroot}"
+
+# see https://github.com/davisking/dlib/issues/2111
+sed -e 's:%{_libdir}/lib:-l:g;s/\.so//g' \
+ -i %{buildroot}%{_libdir}/pkgconfig/dlib-1.pc
+
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+%endif
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license dlib/LICENSE.txt
+%{_libdir}/%{libname}.so.%{soname}*
+
+%files devel
+%doc README.md
+%{_libdir}/%{libname}.so
+%{_includedir}/%{name}
+%{_libdir}/cmake/%{name}
+%{_libdir}/pkgconfig/%{name}-1.pc
+
+
+%changelog
+* Mon Jun 22 2020 Remi Collet <remi@remirepo.net> - 19.20-1
+- initial package
+- open https://github.com/davisking/dlib/issues/2111 broken pkg-config file