Skip to content

Commit

Permalink
New package vcpkg, version 2019.10
Browse files Browse the repository at this point in the history
based on brew package:
- glensc/homebrew-tap#10
  • Loading branch information
glensc committed Apr 25, 2020
0 parents commit ca2f7b0
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions vcpkg.spec
@@ -0,0 +1,52 @@
#
# Conditional build:
%bcond_without tests # build with tests

Summary: C++ Library Manager for Windows, Linux, and MacOS
Name: vcpkg
Version: 2019.10
Release: 1
License: MIT
Group: Development/Tools
Source0: https://github.com/microsoft/vcpkg/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 8785dabef984c260a8e22513177764ef
URL: https://docs.microsoft.com/en-us/cpp/vcpkg
BuildRequires: cmake
BuildRequires: ninja
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Vcpkg helps you manage C and C++ libraries on Windows, Linux and
MacOS.

%prep
%setup -q

%build
sh -x ./bootstrap-vcpkg.sh -useSystemBinaries

%if %{with tests}
./vcpkg search zlib
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_libexecdir}/%{name}}
install -p vcpkg $RPM_BUILD_ROOT%{_libexecdir}/%{name}
cp -a ports scripts triplets .vcpkg-root $RPM_BUILD_ROOT%{_libexecdir}/%{name}
ln -s --relative %{_libexecdir}/%{name}/%{name} $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README.md CHANGELOG.md LICENSE.txt
%doc %lang(zh_CN) README_zh_CN.md
%attr(755,root,root) %{_bindir}/vcpkg
%dir %{_libexecdir}/%{name}
%attr(755,root,root) %{_libexecdir}/%{name}/vcpkg
%{_libexecdir}/%{name}/.vcpkg-root
%{_libexecdir}/%{name}/ports
%{_libexecdir}/%{name}/scripts
%{_libexecdir}/%{name}/triplets

0 comments on commit ca2f7b0

Please sign in to comment.