[packages/libwlocate] - new

qboosh qboosh at pld-linux.org
Sat Jun 22 21:07:25 CEST 2024


commit 8fb58ceafa7f5684e9f5c7fe4e17e310c8569588
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jun 22 21:08:32 2024 +0200

    - new

 libwlocate-make.patch | 31 +++++++++++++++++++++
 libwlocate.spec       | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)
---
diff --git a/libwlocate.spec b/libwlocate.spec
new file mode 100644
index 0000000..6437b4d
--- /dev/null
+++ b/libwlocate.spec
@@ -0,0 +1,76 @@
+Summary:	WLAN based location library
+Summary(pl.UTF-8):	Biblioteka do lokalizacji w oparciu o WLAN
+Name:		libwlocate
+Version:	1.36
+Release:	1
+License:	GPL v3 with exception
+Group:		Libraries
+# https://sourceforge.net/p/libwlocate/code/ci/v1.36/tarball
+Source0:	https://sourceforge.net/code-snapshots/git/l/li/libwlocate/code.git/libwlocate-code-965e1fcd6950a458fcb06f71b9fe484af23e2268.zip
+# Source0-md5:	190ebbc60ae096308a00774ac2c6c301
+Patch0:		%{name}-make.patch
+URL:		https://sourceforge.net/projects/libwlocate/
+BuildRequires:	libiw-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libwlocate is a library that can be used to evaluate a geographical
+position out of the WLAN networks that are available near to a user.
+
+%description -l pl.UTF-8
+libwlocate to biblioteka służąca do wyznaczania położenia
+geograficznego na podstawie sieci WLAN dostępnych w pobliżu
+użytkownika.
+
+%package devel
+Summary:	Header files for libwlocate library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libwlocate
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for libwlocate library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libwlocate.
+
+%prep
+%setup -q -n libwlocate-code-965e1fcd6950a458fcb06f71b9fe484af23e2268
+%patch0 -p1
+
+%build
+cd master
+
+%{__make} -j1 \
+	TARGET=ENV_LINUX \
+	CC="%{__cc}" \
+	STRIP=: \
+	LDFLAGS="%{rpmldflags} -L. -lwlocate -lm" \
+	VERBOUSFLAGS="%{rpmcflags} %{rpmcppflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}}
+
+%{__make} -C master install \
+	CHECK_LIBWLOCATE:=1 \
+	CHECK_LWTRACE:= \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc master/{COPYING,CREDITS,README.md}
+%attr(755,root,root) %{_bindir}/lwtrace
+%attr(755,root,root) %{_libdir}/libwlocate.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/libwlocate.h
diff --git a/libwlocate-make.patch b/libwlocate-make.patch
new file mode 100644
index 0000000..6146023
--- /dev/null
+++ b/libwlocate-make.patch
@@ -0,0 +1,31 @@
+--- libwlocate-code-965e1fcd6950a458fcb06f71b9fe484af23e2268/master/Makefile.orig	2020-05-05 16:41:16.000000000 +0200
++++ libwlocate-code-965e1fcd6950a458fcb06f71b9fe484af23e2268/master/Makefile	2024-06-22 19:03:21.709549452 +0200
+@@ -52,6 +52,11 @@ LIBWLOCATE_EXECUTABLE = libwlocate.so
+ WINLIBWLOCATE_EXECUTABLE = libwlocate.dll
+ LIBWLOCATE_HEADER = libwlocate.h
+ 
++PREFIX=/usr
++BINDIR=$(PREFIX)/bin
++INCLUDEDIR=$(PREFIX)/include
++LIBDIR=$(PREFIX)/lib
++
+ all: libwlocate lwtrace
+ 
+ libwlocate:
+@@ -138,13 +143,13 @@ clean:
+ install:
+ ifndef CHECK_LWTRACE
+ 	@echo "Install $(LWTRACE_EXECUTABLE) ..."
+-	install -m 0755 $(LWTRACE_EXECUTABLE) /usr/bin/$(LWTRACE_EXECUTABLE)
++	install -m 0755 $(LWTRACE_EXECUTABLE) $(DESTDIR)$(BINDIR)/$(LWTRACE_EXECUTABLE)
+ endif
+ ifdef CHECK_LIBWLOCATE
+ 	@echo "Install $(LIBWLOCATE_EXECUTABLE) ..."
+-	install -m 0755 $(LIBWLOCATE_EXECUTABLE) /usr/lib/$(LIBWLOCATE_EXECUTABLE)
++	install -m 0755 $(LIBWLOCATE_EXECUTABLE) $(DESTDIR)$(LIBDIR)/$(LIBWLOCATE_EXECUTABLE)
+ 	@echo "Install $(LIBWLOCATE_HEADER) ..."
+-	install -m 0755 $(LIBWLOCATE_HEADER) /usr/include/$(LIBWLOCATE_HEADER)
++	install -m 0755 $(LIBWLOCATE_HEADER) $(DESTDIR)$(INCLUDEDIR)/$(LIBWLOCATE_HEADER)
+ endif
+ 
+ uninstall:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libwlocate.git/commitdiff/8fb58ceafa7f5684e9f5c7fe4e17e310c8569588



More information about the pld-cvs-commit mailing list