- release 4
[packages/netcf.git] / netcf.spec
1 # TODO: enhance pld_interfaces patch, including PLDifing netcf-transaction (or disabling it)
2 #  maybe create drv_pld.c?
3 Summary:        netcf - a cross-platform network configuration library
4 Summary(pl.UTF-8):      netcf - wieloplatformowa biblioteka do konfiguracji sieci
5 Name:           netcf
6 Version:        0.2.8
7 Release:        4
8 License:        GPL v2
9 Group:          Administration/System
10 Source0:        http://releases.pagure.org/netcf/%{name}-%{version}.tar.gz
11 # Source0-md5:  8edfc9a5856468ae4f8ee97415a3dbf3
12 Patch0:         %{name}-pld_interfaces.patch
13 Patch1:         %{name}-systemd.patch
14 URL:            https://pagure.io/netcf/
15 BuildRequires:  autoconf >= 2.50
16 BuildRequires:  automake >= 1:1.11
17 BuildRequires:  augeas-devel >= 0.5.0
18 BuildRequires:  libnl-devel >= 3.2
19 BuildRequires:  libtool
20 BuildRequires:  libxml2-devel >= 2.0
21 BuildRequires:  libxslt-devel
22 Requires:       augeas >= 0.5.0
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 netcf is a cross-platform network configuration library.
27
28 %description -l pl.UTF-8
29 netcf to wieloplatformowa biblioteka do konfiguracji sieci.
30
31 %package libs
32 Summary:        Netcf library
33 Summary(pl.UTF-8):      Biblioteka netcf
34 Group:          Libraries
35 Requires:       augeas-libs >= 0.5.0
36
37 %description libs
38 This package contains the netcf shared library.
39
40 %description libs -l pl.UTF-8
41 Ten pakiet zawiera bibliotekę współdzieloną netcf.
42
43 %package devel
44 Summary:        Netcf development files
45 Summary(pl.UTF-8):      Pliki programistyczne netcf
46 Group:          Development/Libraries
47 Requires:       %{name}-libs = %{version}-%{release}
48 Requires:       augeas-devel >= 0.5.0
49 Requires:       libxml2-devel >= 2.0
50 Requires:       libxslt-devel
51
52 %description devel
53 This package contains the include files used to develop using netcf
54 APIs.
55
56 %description devel -l pl.UTF-8
57 Ten pakiet zawiera pliki nagłówkow służące do programowania z użyciem
58 API netcf.
59
60 %package static
61 Summary:        The netcf static library
62 Summary(pl.UTF-8):      Statyczna biblioteka netcf
63 Group:          Development/Libraries
64 Requires:       %{name}-devel = %{version}-%{release}
65
66 %description static
67 This package contains the netcf static library.
68
69 %description static -l pl.UTF-8
70 Ten pakiet zawiera statyczną bibliotekę netcf.
71
72 %prep
73 %setup -q
74 %patch0 -p1
75 %patch1 -p1 -b .orig
76
77 %build
78 %{__libtoolize}
79 %{__aclocal} -I gnulib/m4
80 %{__autoconf}
81 %{__autoheader}
82 %{__automake}
83 %configure \
84         --disable-silent-rules \
85         --with-driver=redhat \
86         --with-sysinit=both
87
88 %{__make}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 %{__make} install \
93         DESTDIR=$RPM_BUILD_ROOT
94
95 # obsoleted by pkg-config
96 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnetcf.la
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post   libs -p /sbin/ldconfig
102 %postun libs -p /sbin/ldconfig
103
104 %files
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_bindir}/ncftool
107 %attr(754,root,root) /etc/rc.d/init.d/netcf-transaction
108 %attr(754,root,root) %{_libexecdir}/netcf-transaction.sh
109 %{_datadir}/netcf   
110 %{_mandir}/man1/ncftool.1*
111
112 %files libs
113 %defattr(644,root,root,755)
114 %doc AUTHORS NEWS README
115 %attr(755,root,root) %{_libdir}/libnetcf.so.*.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libnetcf.so.1
117
118 %files devel
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libnetcf.so
121 %{_includedir}/netcf.h
122 %{_pkgconfigdir}/netcf.pc
123
124 %files static
125 %defattr(644,root,root,755)
126 %{_libdir}/libnetcf.a