Summary(zh_CN): LPRng--´òÓ¡³ÌÐò
Name: LPRng
Version: 3.8.28
-Release: 1
+Release: 3
License: GPL or Artistic
Group: Applications/System
Source0: ftp://ftp.lprng.com/pub/LPRng/LPRng/%{name}-%{version}.tgz
Patch3: %{name}-missing-nls.patch
Patch4: %{name}-pl.po.patch
Patch5: %{name}-types.patch
+Patch6: %{name}-shell.patch
URL: http://www.lprng.com/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: openssl-devel >= 0.9.7d
-PreReq: rc-scripts >= 0.2.0
+BuildRequires: rpmbuild(macros) >= 1.268
Requires(post): /sbin/ldconfig
Requires(post,preun): /sbin/chkconfig
-Obsoletes: lpr
+Requires: rc-scripts >= 0.2.0
Obsoletes: cups
Obsoletes: cups-clients
+Obsoletes: lpr
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define filterout_ld -Wl,--as-needed
+
%description
The LPRng software is an enhanced, extended, and portable
implementation of the Berkeley LPR print spooler functionality. While
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
rm -rf autom4te.cache
+mv PrintingCookbook/{HTML,PrintingCookbook}
%build
%{__gettextize}
--with-lockfile=%{_var}/spool/lpd/lpd \
--with-lpd_conf_path=%{_sysconfdir}/lpd.conf \
--with-lpd_perms_path=%{_sysconfdir}/lpd.perms \
- --with-done_jobs=0
+ --with-done_jobs=0 \
+ --disable-werror
-%{__make}
+%{__make} -j1
%{__make} -C man
%install
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/lpd
# yes, overwrite distribution lpd.conf
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lpd.conf
-echo "default_printer = lp" >>$RPM_BUILD_ROOT%{_sysconfdir}/lpd.conf
+echo "default_printer = lp" >> $RPM_BUILD_ROOT%{_sysconfdir}/lpd.conf
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/printcap
install lpd.perms $RPM_BUILD_ROOT%{_sysconfdir}
-# default spool
bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
-mv -f PrintingCookbook/{HTML,PrintingCookbook}
+rm -f $RPM_BUILD_ROOT%{_libdir}/liblpr.{la,a}
%find_lang %{name}
%post
/sbin/ldconfig
/sbin/chkconfig --add lpd
-if [ -f /var/lock/subsys/lpd ]; then
- /etc/rc.d/init.d/lpd restart 1>&2
-else
- echo "Run \"/etc/rc.d/init.d/lpd start\" to start LPRng lpd daemon."
-fi
+%service lpd restart "LPRng lpd daemon"
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/lpd ]; then
- /etc/rc.d/init.d/lpd stop 1>&2
- fi
/sbin/chkconfig --del lpd
+ %service lpd stop
fi
%postun -p /sbin/ldconfig