A new user interface for you! Read more...

File libQtShadowsocks.spec of Package libQtShadowsocks

#
# spec file for package libQtShadowsocks
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           libQtShadowsocks
Version:	2.1.0
Release:	0
License:	LGPL-3.0+
Summary:	A Shadowsocks library written in C++/Qt5
Url:	https://github.com/shadowsocks/libQtShadowsocks
Group:	Productivity/Networking/Web/Proxy
Source:	%{name}-%{version}.tar.xz
Patch: %{name}-make_unique.patch
BuildRequires:	gcc-c++
BuildRequires:	libqt5-qtbase-devel
BuildRequires:	libbotan-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libQtShadowsocks is a lightweight library for shadowsocks.

It is written in C++ using Qt5 frameworks. Therefore, the
major purpose of this project is to provide a 
developer-friendly shadowsocks library, mainly for Qt 
applications, i.e. shadowsocks-qt5.

The client utilises this library. You can check the code 
to see how to use libQtShadowsocks in your project. 
client can also be used as both Shadowsocks local client
and Shadowsocks server.

%package -n libQtShadowsocks2
Summary:	A Shadowsocks library written in C++/Qt5
Group:	System/Libraries

%description -n libQtShadowsocks2
libQtShadowsocks is a lightweight library for shadowsocks.

It is written in C++ using Qt5 frameworks. Therefore, the
major purpose of this project is to provide a
developer-friendly shadowsocks library, mainly for Qt
applications, i.e. shadowsocks-qt5.

The client utilises this library. You can check the code
to see how to use libQtShadowsocks in your project.
client can also be used as both Shadowsocks local client
and Shadowsocks server.

%package devel
Summary:	Development headers for libQtShadowsocks
Group:	Development/Libraries/C and C++
Requires:	libQtShadowsocks2 = %{version}

%description devel
This package provides development headers for libQtShadowsocks.

%prep
%setup -q
%patch -p1

%build
%cmake -DLIB_INSTALL_DIR=%{_libdir} \
       -DUSE_BOTAN2=ON 

%install
%cmake_install
install -m0644 lib/make_unique.h %{buildroot}%{_includedir}/QtShadowsocks/

%post -n libQtShadowsocks2 -p /sbin/ldconfig

%postun -n libQtShadowsocks2 -p /sbin/ldconfig

%files -n libQtShadowsocks2
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/shadowsocks-libqss
%{_libdir}/libQtShadowsocks.so.2
%{_libdir}/libQtShadowsocks.so.2.1.0

%files devel
%defattr(-,root,root)
%{_includedir}/QtShadowsocks
%{_libdir}/libQtShadowsocks.so
%{_libdir}/pkgconfig/QtShadowsocks.pc