]> git.pld-linux.org Git - packages/libpsl.git/blobdiff - libpsl.spec
- updated to 0.21.1
[packages/libpsl.git] / libpsl.spec
index ae51b485cb29727cf003960e5d959079da07302c..f4c30efe767eff377e3e5fd4018543535ead77e8 100644 (file)
@@ -1,32 +1,40 @@
 #
 # Conditional build:
 %bcond_without static_libs     # static library
-#
+%bcond_with    icu             # use ICU instead of libidn2+libunistring for IDNA2008
+
 Summary:       C library for the Publix Suffix List
 Summary(pl.UTF-8):     Biblioteka C do obsługi listy przyrostków publicznych (Public Suffix List)
 Name:          libpsl
-Version:       0.8.1
+Version:       0.21.1
 Release:       1
 License:       MIT
 Group:         Networking
-Source0:       https://github.com/rockdaboot/libpsl/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 515060957760ed78d5bd5a87f424b5d5
+#Source0Download: https://github.com/rockdaboot/libpsl/releases
+Source0:       https://github.com/rockdaboot/libpsl/releases/download/%{version}/%{name}-%{version}.tar.lz
+# Source0-md5: ebbc144e311a66cfdae503f48f21bf2d
+%if 0
+# not required if packaged with libpsl release
 %define        psl_ref 1fc1ed365818a6a77d6f31d425ff03ca54cdc7f3
 %define        psldate 20150827
 Source1:       https://github.com/publicsuffix/list/archive/%{psl_ref}/publicsuffix_list-%{psldate}.tar.gz
 # Source1-md5: ee9a591d4545d9f6ca350bd9df2c2e51
-Patch0:                %{name}-am.patch
+%endif
 URL:           https://rockdaboot.github.io/libpsl
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1:1.10
 BuildRequires: gettext-tools >= 0.18.1
 BuildRequires: glib2-devel
 BuildRequires: gtk-doc >= 1.15
-BuildRequires: libicu-devel
+%{?with_icu:BuildRequires:     libicu-devel}
+%{!?with_icu:BuildRequires:    libidn2-devel}
 BuildRequires: libtool >= 2:2
 BuildRequires: libxslt-progs
 BuildRequires: pkgconfig
+BuildRequires: python >= 1:2.7
 BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -104,6 +112,9 @@ Statyczna biblioteka libpsl.
 Summary:       API documentation for libpsl library
 Summary(pl.UTF-8):     Dokumentacja API biblioteki libpsl
 Group:         Documentation
+%if "%{_rpmversion}" >= "4.6"
+BuildArch:     noarch
+%endif
 
 %description apidocs
 API documentation for libpsl library.
@@ -129,15 +140,13 @@ przykład, czy domeny są przyrostkami publicznymi, czy domena
 ciasteczka jest akceptowalna dla domen itp.
 
 %prep
-%setup -q -n %{name}-%{name}-%{version}
-%patch0 -p1
+%setup -q
 
+%if 0
 rmdir list
 %{__tar} xf %{SOURCE1}
 %{__mv} list-%{psl_ref} list
-
-# gettextize workaround
-%{__sed} -i -e 's,po/Makefile\.in,,' configure.ac
+%endif
 
 %build
 %{__gettextize}
@@ -147,12 +156,13 @@ rmdir list
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-
 %configure \
        --disable-silent-rules \
        %{!?with_static_libs:--disable-static} \
        --enable-gtk-doc \
        --enable-man \
+       --enable-builtin=%{?with_icu:libicu}%{!?with_icu:libidn2} \
+       --enable-runtime=%{?with_icu:libicu}%{!?with_icu:libidn2} \
        --with-html-dir=%{_gtkdocdir}
 
 %{__make}
@@ -166,6 +176,8 @@ rm -rf $RPM_BUILD_ROOT
 
 # obsoleted by pkg-config
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpsl.la
+# tool not installed
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/psl-make-dafsa.1
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -175,9 +187,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING NEWS README.md
+%doc AUTHORS COPYING NEWS
 %attr(755,root,root) %{_libdir}/libpsl.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpsl.so.0
+%attr(755,root,root) %ghost %{_libdir}/libpsl.so.5
 
 %files devel
 %defattr(644,root,root,755)
@@ -186,9 +198,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/libpsl.pc
 %{_mandir}/man3/libpsl.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libpsl.a
+%endif
 
 %files apidocs
 %defattr(644,root,root,755)
@@ -197,3 +211,4 @@ rm -rf $RPM_BUILD_ROOT
 %files utils
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/psl
+%{_mandir}/man1/psl.1*
This page took 0.153345 seconds and 4 git commands to generate.