]> git.pld-linux.org Git - packages/pacparser.git/blob - pacparser.spec
452036a050a63ce0df1e4193f50f30efadc20f2d
[packages/pacparser.git] / pacparser.spec
1 #
2 # Conditional build:
3 %bcond_without  python  # Python module
4 #
5 Summary:        A library to make your web software pac (proxy auto-config) files intelligent
6 Summary(pl.UTF-8):      Biblioteka do obsługi plików pac (automatycznej konfiguracji proxy)
7 Name:           pacparser
8 Version:        1.3.0
9 Release:        1
10 License:        LGPL v3+
11 Group:          Libraries
12 Source0:        http://pacparser.googlecode.com/files/%{name}-%{version}.tar.gz
13 # Source0-md5:  6dcfda10803913df38249fb39990dd87
14 #Source0Download: http://code.google.com/p/pacparser/downloads/list
15 Patch0:         %{name}-make.patch
16 Patch1:         %{name}-libdir.patch
17 Patch2:         %{name}-python.patch
18 URL:            http://code.google.com/p/pacparser/
19 BuildRequires:  js-devel
20 BuildRequires:  rpmbuild(macros) >= 1.566
21 BuildRequires:  sed >= 4.0
22 %if %{with python}
23 BuildRequires:  python-devel
24 BuildRequires:  rpm-pythonprov
25 %endif
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 pacparser is a library to parse proxy auto-config (PAC) files. Proxy
30 auto-config files are a vastly used proxy configuration method these
31 days. Web browsers can use a PAC file to determine which proxy server
32 to use or whether to go direct for a given URL. PAC files are written
33 in JavaScript and can be programmed to return different proxy methods
34 (e.g. "PROXY proxy1:port; DIRECT") depending upon URL, source IP
35 address, protocol, time of the day etc. PAC files introduce a lot of
36 possibilities.
37
38 Needless to say, PAC files are now a widely accepted method for proxy
39 configuration management and companies all over are using them in
40 corporate environment. Almost all popular web browsers support PAC
41 files. The idea behind pacparser is to make it easy to add this PAC
42 file parsing capability to any program (C and Python supported right
43 now). Some very useful targets could be popular web software like
44 wget, curl and python-urllib.
45
46 %description -l pl.UTF-8
47 pacparser to biblioteka do analizy plików automatycznej konfiguracji
48 proxy PAC (proxy auto-config). Pliki te są obecnie szeroko stosowaną
49 metodą do konfiguracji proxy. Przeglądarki potrafią użyć pliku PAC do
50 określenia, którego serwera proxy mają użyć lub jak połączyć się
51 bezpośrednio z danym URL-em. Pliki PAC są pisane w JavaScripcie i mogą
52 zwracać różne metody proxy (np. "PROXY proxy1:port; DIRECT") w
53 zależności od URL-a, adresu źródłowego IP, protokołu, pory dnia itp.
54 Pliki PAC wprowadzają wiele możliwości.
55
56 Nie trzeba mówić, że pliki PAC są teraz szeroko akceptowaną metodą
57 zarządzania konfiguracją proxy, a firmy używają ich w swoich
58 wewnętrznych środowiskach. Prawie wszystkie popularne przeglądarki WWW
59 obsługują pliki PAC. Ideą stojącą za biblioteką pacparser jest
60 ułatwienie dodawania obsługi PAC do dowolnego programu (obecnie
61 obsługiwane są języki C i Python). Przydatnymi zastosowaniami mogłyby
62 być popularne programy do stron WWW, takie jak wget, curl czy
63 python-urllib.
64
65 %package devel
66 Summary:        Header files for pacparser library
67 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki pacparser
68 Group:          Development/Libraries
69 Requires:       %{name} = %{version}-%{release}
70
71 %description devel
72 Header files for pacparser library.
73
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe biblioteki pacparser.
76
77 %package -n python-pacparser
78 Summary:        Python interface for pacparser library
79 Summary(pl.UTF-8):      Interfejs Pythona do biblioteki pacparser
80 Group:          Libraries/Python
81 Requires:       %{name} = %{version}-%{release}
82 %pyrequires_eq  python-libs
83
84 %description -n python-pacparser
85 Python interface for pacparser library.
86
87 %description -n python-pacparser -l pl.UTF-8
88 Interfejs Pythona do biblioteki pacparser.
89
90 %prep
91 %setup -q
92 %patch0 -p1
93 %patch1 -p1
94 %undos src/pymod/setup.py
95 %patch2 -p1
96
97 %build
98 %{__make} -C src \
99         CC="%{__cc}" \
100         CFLAGS="%{rpmcflags} -I/usr/include/js -DXP_UNIX" \
101         LDFLAGS="%{rpmldflags} -ljs" \
102         LIB=%{_lib}
103
104 %if %{with python}
105 cd src/pymod
106 CFLAGS="%{rpmcflags}" \
107 LDFLAGS="%{rpmldflags} -L$(pwd)/.." \
108 %{__python} setup.py build
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %{__make} -C src install \
115         DESTDIR=$RPM_BUILD_ROOT \
116         LIB=%{_lib}
117
118 %if %{with python}
119 cd src/pymod
120 %{__python} setup.py install \
121         --optimize=2 \
122         --root=$RPM_BUILD_ROOT
123
124 %py_postclean
125 %endif
126
127 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post   -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
134
135 %files
136 %defattr(644,root,root,755)
137 %doc README
138 %attr(755,root,root) %{_bindir}/pactester
139 %attr(755,root,root) %{_libdir}/libpacparser.so.1
140 %{_mandir}/man1/pactester.1*
141
142 %files devel
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libpacparser.so
145 %{_includedir}/pacparser.h
146 %{_mandir}/man3/pacparser*.3*
147
148 %if %{with python}
149 %files -n python-pacparser
150 %defattr(644,root,root,755)
151 %dir %{py_sitedir}/pacparser
152 %attr(755,root,root) %{py_sitedir}/pacparser/_pacparser.so
153 %{py_sitedir}/pacparser/__init__.py[co]
154 %{py_sitedir}/pacparser-1-py*.egg-info
155 %endif
This page took 0.138128 seconds and 2 git commands to generate.