]>
Commit | Line | Data |
---|---|---|
4552c890 JB |
1 | %include /usr/lib/rpm/macros.mono |
2 | Summary: Json.NET - a popular high-performance JSON framework for .NET | |
3 | Summary(pl.UTF-8): Json.NET - popularny, wydajny szkielet JSON dla .NET | |
4 | Name: dotnet-newtonsoft-json | |
46cada07 JB |
5 | Version: 9.0.1 |
6 | Release: 1 | |
4552c890 JB |
7 | License: MIT |
8 | Group: Libraries | |
46cada07 | 9 | #Source0Download: https://github.com/JamesNK/Newtonsoft.Json/releases |
4552c890 | 10 | Source0: https://github.com/JamesNK/Newtonsoft.Json/archive/%{version}/Newtonsoft.Json-%{version}.tar.gz |
46cada07 | 11 | # Source0-md5: 737f366d719f7eb761c585ab755ade2e |
4552c890 JB |
12 | Source1: newtonsoft-json.pc.in |
13 | Source2: Newtonsoft.Json.source | |
14 | URL: http://james.newtonking.com/json | |
15 | BuildRequires: mono-csharp | |
16 | # xbuild | |
17 | BuildRequires: mono-devel | |
18 | BuildRequires: mono-monodoc | |
bf62ede1 | 19 | BuildRequires: rpmbuild(macros) >= 1.446 |
4552c890 JB |
20 | BuildRequires: rpmbuild(monoautodeps) |
21 | Requires: mono | |
22 | ExclusiveArch: %{ix86} %{x8664} arm ia64 ppc s390 s390x sparc sparcv9 sparc64 | |
23 | ExcludeArch: i386 | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
4552c890 JB |
26 | %description |
27 | Json.NET is a popular high-performance JSON framework for .NET. | |
28 | Features: | |
29 | - Flexible JSON serializer for converting between .NET objects and | |
30 | JSON | |
31 | - LINQ to JSON for manually reading and writing JSON | |
32 | - High performance, faster than .NET's built-in JSON serializers | |
33 | - Write indented, easy to read JSON | |
34 | - Convert JSON to and from XML | |
35 | - Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and | |
36 | Windows 8. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Json.NET to popularny, wydajny szkielet JSON dla .NET. Cechują go: | |
40 | - elastyczna serializacja JSON do konwersji między obiektami .NET i | |
41 | JSON | |
42 | - LINQ do JSON do ręcznego odczytu i zapisu formatu JSON | |
43 | - wydajna, szybsza niż wbudowana w .NET serializacja JSON | |
44 | - zapis czytelnego, zawierającego wcięcia formatu JSON | |
45 | - konwersja JSON do i z XML | |
46 | - obsługa .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone oraz | |
47 | Windows 8. | |
48 | ||
49 | %package devel | |
50 | Summary: Development files for Json.NET library | |
51 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Json.NET | |
52 | Group: Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
54 | ||
55 | %description devel | |
56 | Development files for Json.NET library. | |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki programistyczne biblioteki Json.NET. | |
60 | ||
61 | %prep | |
62 | %setup -q -n Newtonsoft.Json-%{version} | |
63 | ||
64 | %build | |
65 | # rules taken from Debian packaging | |
66 | xbuild Src/Newtonsoft.Json/Newtonsoft.Json.Net40.csproj \ | |
67 | /property:SignAssembly=true \ | |
68 | /property:AssemblyOriginatorKeyFile=Dynamic.snk \ | |
69 | /property:Configuration=Release \ | |
70 | /property:DefineConstants='SIGNED NET40 TRACE' | |
71 | mdoc update \ | |
72 | -o monodoc \ | |
73 | -i Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.xml \ | |
74 | Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.dll | |
75 | mdoc assemble \ | |
76 | --format ecma \ | |
77 | --out Newtonsoft.Json \ | |
78 | monodoc | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
bf62ede1 | 82 | install -d $RPM_BUILD_ROOT{%{_npkgconfigdir},%{_prefix}/lib/monodoc/sources} |
4552c890 JB |
83 | |
84 | gacutil -f -i Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.dll \ | |
46cada07 | 85 | /package Newtonsoft.Json-9.0 \ |
4552c890 JB |
86 | /gacdir $RPM_BUILD_ROOT%{_prefix}/lib |
87 | ||
88 | cp -p Newtonsoft.Json.{zip,tree} %{SOURCE2} $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources | |
89 | ||
90 | %{__sed} -e 's,@prefix@,%{_prefix},' \ | |
91 | -e 's,@VERSION@,%{version},' \ | |
46cada07 | 92 | -e 's,@MAJOR@,9.0,' \ |
bf62ede1 | 93 | %{SOURCE1} > $RPM_BUILD_ROOT%{_npkgconfigdir}/newtonsoft-json.pc |
4552c890 JB |
94 | |
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc LICENSE.md Doc/readme.txt | |
101 | %{_prefix}/lib/mono/gac/Newtonsoft.Json | |
102 | ||
103 | %files devel | |
104 | %defattr(644,root,root,755) | |
46cada07 | 105 | %{_prefix}/lib/mono/Newtonsoft.Json-9.0 |
4552c890 | 106 | %{_prefix}/lib/monodoc/sources/Newtonsoft.Json.* |
bf62ede1 | 107 | %{_npkgconfigdir}/newtonsoft-json.pc |