[packages/crossguid] new
glen
glen at pld-linux.org
Thu Apr 14 22:30:14 CEST 2016
commit d7b8cffa5655d273fcaa46c7ee6a5ff62628f8d8
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Apr 14 23:29:17 2016 +0300
new
based on fedora package, fcbd3aa
Makefile | 33 ++++++++++++++++++++++++++
crossguid.spec | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 107 insertions(+)
---
diff --git a/crossguid.spec b/crossguid.spec
new file mode 100644
index 0000000..081556a
--- /dev/null
+++ b/crossguid.spec
@@ -0,0 +1,74 @@
+%define rel 1
+%define short_commit 8f399e8
+%define commit_date 20150803
+Summary: Lightweight cross platform C++ GUID/UUID library
+Name: crossguid
+Version: 0
+Release: 0.%{rel}.%{commit_date}
+License: MIT
+Group: Libraries
+Source0: https://github.com/graeme-hill/crossguid/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz
+# Source0-md5: 696a6573286d6fdbfde18686aa9f6489
+URL: https://github.com/graeme-hill/crossguid/
+Source1: Makefile
+BuildRequires: libstdc++-devel
+BuildRequires: libuuid-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+CrossGuid is a minimal, cross platform, C++ GUID library. It uses the
+best native GUID/UUID generator on the given platform and has a
+generic class for parsing, stringifying, and comparing IDs.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -qc
+mv %{name}-*/* .
+
+cp -p %{SOURCE1} Makefile
+
+%build
+%{__make} \
+ CXX="%{__cxx}" \
+ LDFLAGS="%{rpmldflags}" \
+ CXXFLAGS="%{rpmcxxflags}"
+
+%if %{with tests}
+%{__make} \
+ CXX="%{__cxx}" \
+ LDFLAGS="%{rpmldflags}" \
+ CXXFLAGS="%{rpmcxxflags}"
+./test
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+ LIBDIR=%{_libdir} \
+ INCLUDEDIR=%{_includedir} \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%attr(755,root,root) %{_libdir}/libcrossguid.so.*.*.*
+%ghost %{_libdir}/libcrossguid.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/guid.h
+%{_libdir}/libcrossguid.so
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fd0432e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+override CXXFLAGS += -std=c++11 -DGUID_LIBUUID -fPIC
+LIBS = -luuid
+MAJOR := 0
+MINOR := 0
+VERSION := $(MAJOR).$(MINOR).0
+NAME = crossguid
+
+INCLUDEDIR = /usr/include
+LIBDIR = /usr/lib
+
+LINK.o = $(LINK.cc)
+
+SRC = $(wildcard *.cpp)
+OBJ = $(SRC:.cpp=.o)
+LIB = lib$(NAME).so.$(VERSION)
+
+$(LIB): guid.o
+ $(CXX) $(LIBS) $(LDFLAGS) -shared -Wl,-soname,lib$(NAME).so.$(MAJOR) $^ -o $@
+
+test: $(OBJ)
+
+install: guid.h $(LIB)
+ install -dm 0755 $(DESTDIR)$(INCLUDEDIR)
+ install -pm 0644 guid.h $(DESTDIR)$(INCLUDEDIR)
+ install -dm 0755 $(DESTDIR)$(LIBDIR)
+ install -pm 0755 $(LIB) $(DESTDIR)$(LIBDIR)
+ ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so
+ ln -sf $(LIB) $(DESTDIR)$(LIBDIR)/lib$(NAME).so.$(MAJOR)
+
+clean:
+ $(RM) $(OBJ) $(LIB) test
+
+.PHONY: run-test install clean
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/crossguid.git/commitdiff/d7b8cffa5655d273fcaa46c7ee6a5ff62628f8d8
More information about the pld-cvs-commit
mailing list