%global dbus_version 1.10.14-1 %global gnutls_version 2.12.23-2 %global krb5_version 1.14.4-1 %global libiconv_version 1.14-3 %global zlib_version 1.2.3-7 %define _libdir64 %{_prefix}/lib64 %define cups_serverbin %{_libdir}/%{name} Summary: Common Unix Printing System Name: cups Version: 2.2.3 Release: 2 License: GPLv2 Group: System Environment/Daemons Source0: https://github.com/apple/cups/releases/download/v%{version}/%{name}-%{version}-source.tar.gz Source1: https://github.com/apple/cups/releases/download/v%{version}/%{name}-%{version}-source.tar.gz.sig Source99: cups-1.6.2-generic.png Patch0: %{name}-2.2.1-aix.patch Patch1: %{name}-2.2.1-http_status_t.patch Patch2: %{name}-%{version}.test.patch Patch3: %{name}-%{version}-aix.patch URL: http://www.cups.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: sed BuildRequires: dbus-devel >= %{dbus_version} #BuildRequires: krb5-devel >= %{krb5_version} #BuildRequires: libiconv >= %{libiconv_version} BuildRequires: zlib-devel >= %{zlib_version} Requires: %{name}-libs = %{version}-%{release} Requires: dbus >= %{dbus_version} #Requires: krb5-libs >= %{krb5_version} #%ifos aix5.1 #Requires: AIX-rpm >= 5.1.0.0 #Requires: AIX-rpm < 5.2.0.0 #%endif #%ifos aix5.2 #Requires: AIX-rpm >= 5.2.0.0 #Requires: AIX-rpm < 5.3.0.0 #%endif #%ifos aix5.3 #Requires: AIX-rpm >= 5.3.0.0 #Requires: AIX-rpm < 5.4.0.0 #%endif #%ifos aix6.1 #Requires: AIX-rpm >= 6.1.0.0 #Requires: AIX-rpm < 6.2.0.0 #%endif #%ifos aix7.1 #Requires: AIX-rpm >= 7.1.0.0 #Requires: AIX-rpm < 7.2.0.0 #%endif #%ifos aix7.2 #Requires: AIX-rpm >= 7.2.0.0 #Requires: AIX-rpm < 7.3.0.0 #%endif %description The Common UNIX Printing System provides a portable printing layer for UNIX operating systems. It has been developed by Easy Software Products to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. %package client Summary: CUPS printing system - client programs Group: System Environment/Daemons License: GPLv2 Requires: %{name}-libs = %{version}-%{release} #Requires: krb5-libs >= %{krb5_version} %description client CUPS printing system provides a portable printing layer for UNIX® operating systems. This package contains command-line client programs. %package devel Summary: Common Unix Printing System - development environment Group: Development/Libraries License: LGPLv2 Requires: %{name}-libs = %{version}-%{release} Requires: dbus-devel >= %{dbus_version} Requires: gnutls-devel >= %{gnutls_version} #Requires: krb5-devel >= %{krb5_version} #Requires: libiconv >= %{libiconv_version} Requires: zlib-devel >= %{zlib_version} %description devel The Common UNIX Printing System provides a portable printing layer for UNIX operating systems. This is the development package for creating additional printer drivers, and other CUPS services. %package libs Summary: Common Unix Printing System - libraries Group: System Environment/Libraries License: LGPLv2 Requires: gnutls >= %{gnutls_version} #Requires: krb5-libs >= %{krb5_version} #Requires: libiconv >= %{libiconv_version} Requires: zlib >= %{zlib_version} %description libs The Common UNIX Printing System provides a portable printing layer for UNIX operating systems. It has been developed by Easy Software Products to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. The cups-libs package provides libraries used by applications to use CUPS natively, without needing the lp/lpr commands. %package lpd Summary: Common Unix Printing System - lpd emulation Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} #Requires: krb5-libs >= %{krb5_version} %description lpd The Common UNIX Printing System provides a portable printing layer for UNIX operating systems. This is the package that provices standard lpd emulation. %package ipptool Summary: Common Unix Printing System - tool for performing IPP requests Group: System Environment/Daemons Requires: %{name}-libs = %{version}-%{release} #Requires: krb5-libs >= %{krb5_version} %description ipptool Sends IPP requests to the specified URI and tests and/or displays the results. %prep %setup -q cp %{SOURCE99} doc/images/generic.png %patch0 %patch1 %patch2 %patch3 -p0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="/usr/vac/bin/xlc_r -q64" export CXX="/usr/vacpp/bin/xlC_r -q64" build_shared_library() { cd $2 f=$3 /usr/vac/bin/CreateExportList $1 ${f}.exp ${f}.a ${CC} -qmkshrobj ${f}.a -o $3.so.$4 -bE:${f}.exp -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -bernotok $5 $6 $7 $8 $9 rm -f ${f}.exp ${f}.a /usr/bin/ar $1 -rv ${f}.a $3.so.$4 cd .. } cd 64bit # first build the 64-bit version export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export DSOFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib" export OBJECT_MODE=64 # need to change the KRB5 config file otherwise we'll end up with 32-bit libs # which can't be linked to 64-bit objects /opt/freeware/bin/sed -i 's/set dummy krb5-config/set dummy krb5-config_64/g' configure ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-shared --enable-static \ --enable-ssl \ --enable-threads \ --disable-cdsassl \ --enable-largefile \ --with-perl=/opt/freeware/perl64 \ --without-php \ --without-python # on AIX asl.h is the AIX Screen Library not cdsassl ! /opt/freeware/bin/sed -i 's|#define HAVE_ASL_H 1|/* undef HAVE_ASL_H */|g' config.h make %{?_smp_mflags} libs # fix 'Makedefs' so we link dynamically (from /opt/freeware/lib) /opt/freeware/bin/sed -i 's|../cups/libcups.a|-lcups|g' Makedefs /opt/freeware/bin/sed -i 's|../filter/libcupsimage.a|-lcupsimage|g' Makedefs build_shared_library -X64 cups libcups 2 -lgnutls -liconv -lz -lm -L/opt/freeware/lib build_shared_library -X64 cgi-bin libcupscgi 1 -L../cups -lcups build_shared_library -X64 filter libcupsimage 2 -L../cups -lcups build_shared_library -X64 ppdc libcupsppdc 1 -L../cups -lcups -lC build_shared_library -X64 scheduler libcupsmime 1 -L../cups -lcups make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export CC="/usr/vac/bin/xlc_r -q32" export CXX="/usr/vacpp/bin/xlC_r -q32" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export DSOFLAGS="-L/opt/freeware/lib" export OBJECT_MODE=32 export AR="/usr/bin/ar" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-shared --enable-static \ --enable-ssl \ --enable-threads \ --disable-cdsassl \ --enable-largefile \ --with-perl=/opt/freeware/bin/perl \ --without-php \ --without-python # on AIX asl.h is the AIX Screen Library not cdsassl ! /opt/freeware/bin/sed -i 's|#define HAVE_ASL_H 1|/* undef HAVE_ASL_H */|g' config.h make %{?_smp_mflags} libs # fix 'Makedefs' so we link dynamically (from /opt/freeware/lib) /opt/freeware/bin/sed -i 's|../cups/libcups.a|-lcups|g' Makedefs /opt/freeware/bin/sed -i 's|../filter/libcupsimage.a|-lcupsimage|g' Makedefs build_shared_library -X32 cups libcups 2 -lgnutls -liconv -lz -lm build_shared_library -X32 cgi-bin libcupscgi 1 -L../cups -lcups build_shared_library -X32 filter libcupsimage 2 -L../cups -lcups build_shared_library -X32 ppdc libcupsppdc 1 -L../cups -lcups -lC build_shared_library -X32 scheduler libcupsmime 1 -L../cups -lcups make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make install DSTROOT=${RPM_BUILD_ROOT} mv ${RPM_BUILD_ROOT}%{_bindir}/cups-config ${RPM_BUILD_ROOT}%{_bindir}/cups-config_64 cd ../32bit export OBJECT_MODE=32 make install DSTROOT=${RPM_BUILD_ROOT} /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_sbindir}/* || : /usr/bin/rm -rf ${RPM_BUILD_ROOT}/etc/rc.d/rc[05].d mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/locale /usr/bin/mv -f ${RPM_BUILD_ROOT}%{_libdir}/locale/* ${RPM_BUILD_ROOT}%{_datadir}/locale/ ( cd ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 *.a for f in *.a ; do /usr/bin/ar -X32 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir64} chmod 0644 *.a for f in *.a ; do /usr/bin/ar -X64 -x ${f} done ) # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects export AR="/usr/bin/ar -X32_64" for f in cups cupscgi cupsimage cupsppdc cupsmime ; do ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/lib${f}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib${f}.so.* done ( cd ${RPM_BUILD_ROOT} for dir in bin sbin include lib lib64 do mkdir -p usr/linux/${dir} cd usr/linux/${dir} ln -sf ../../..%{_prefix}/${dir}/* . cd - done ) ( cd ${RPM_BUILD_ROOT} cd opt/freeware/lib ln -sf libcups.so.2 ../../..%{_libdir}/libcups.so ln -sf libcupscgi.so.1 ../../..%{_libdir}/libcupscgi.so ln -sf libcupsimage.so.2 ../../..%{_libdir}/libcupsimage.so ln -sf libcupsmime.so.1 ../../..%{_libdir}/libcupsmime.so ln -sf libcupsppdc.so.1 ../../..%{_libdir}/libcupsppdc.so cd ../lib64 ln -sf libcups.so.2 ../../..%{_libdir64}/libcups.so ln -sf libcupscgi.so.1 ../../..%{_libdir64}/libcupscgi.so ln -sf libcupsimage.so.2 ../../..%{_libdir64}/libcupsimage.so ln -sf libcupsmime.so.1 ../../..%{_libdir64}/libcupsmime.so ln -sf libcupsppdc.so.1 ../../..%{_libdir64}/libcupsppdc.so cd - ) %post # Remove old-style certs directory; new-style is /var/run # (see bug #194581 for why this is necessary). /usr/bin/rm -rf /etc/%{name}/certs /usr/bin/rm -f /var/cache/%{name}/*.ipp /var/cache/%{name}/*.cache exit 0 %preun if [ "$1" = "0" ]; then /etc/rc.d/init.d/cups stop > /dev/null 2>&1 fi exit 0 %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/LICENSE.txt 32bit/README.txt 32bit/CREDITS.txt 32bit/CHANGES.txt %{_bindir}/cupstestdsc %{_bindir}/cupstestppd %{_bindir}/ppd* %{_sbindir}/* /etc/rc.d/init.d/%{name} /etc/rc.d/rc2.d/*%{name} /etc/rc.d/rc3.d/*%{name} %dir %attr(0755,root,lp) /etc/%{name} %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/%{name}/cups-files.conf %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/%{name}/cups-files.conf.N %attr(0640,root,lp) /etc/%{name}/cups-files.conf.default %verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) /etc/%{name}/cupsd.conf %verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) /etc/%{name}/cupsd.conf.N %attr(0640,root,lp) /etc/%{name}/cupsd.conf.default %dir %attr(0755,root,lp) /etc/%{name}/ppd %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/%{name}/snmp.conf %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/%{name}/snmp.conf.N %attr(0640,root,lp) /etc/%{name}/snmp.conf.default %dir %attr(0700,root,lp) /etc/%{name}/ssl %dir %attr(0755,root,lp) /var/run/%{name} %dir %attr(0511,lp,system) /var/run/%{name}/certs %dir %attr(0775,root,lp) /var/cache/%{name} %dir %attr(0775,root,lp) /var/cache/%{name}/rss %dir %attr(0710,root,lp) /var/spool/%{name} %dir %attr(1770,root,lp) /var/spool/%{name}/tmp %dir %attr(0755,lp,system) /var/log/%{name} %dir %{cups_serverbin} %{cups_serverbin}/backend %{cups_serverbin}/cgi-bin %dir %{cups_serverbin}/daemon %{cups_serverbin}/daemon/cups-deviced %{cups_serverbin}/daemon/cups-driverd %{cups_serverbin}/daemon/cups-exec %{cups_serverbin}/driver %{cups_serverbin}/filter %{cups_serverbin}/monitor %{cups_serverbin}/notifier %{_mandir}/man?/* %dir %{_datadir}/doc/%{name} %dir %{_datadir}/doc/%{name}/de %dir %{_datadir}/doc/%{name}/es %dir %{_datadir}/doc/%{name}/ja %dir %{_datadir}/doc/%{name}/pt_BR %dir %{_datadir}/doc/%{name}/ru %doc %{_datadir}/doc/%{name}/help %{_datadir}/doc/%{name}/images %{_datadir}/doc/%{name}/*.css %doc %{_datadir}/doc/%{name}/apple-touch-icon.png %doc %{_datadir}/doc/%{name}/index.html %doc %{_datadir}/doc/%{name}/robots.txt %doc %{_datadir}/doc/%{name}/de/index.html %doc %{_datadir}/doc/%{name}/es/index.html %doc %{_datadir}/doc/%{name}/ja/index.html %doc %{_datadir}/doc/%{name}/pt_BR/index.html %doc %{_datadir}/doc/%{name}/ru/index.html %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/banners %{_datadir}/%{name}/data %{_datadir}/%{name}/model %dir %{_datadir}/%{name}/templates %dir %{_datadir}/%{name}/templates/de %dir %{_datadir}/%{name}/templates/es %dir %{_datadir}/%{name}/templates/ja %dir %{_datadir}/%{name}/templates/ru %dir %{_datadir}/%{name}/templates/pt_BR %{_datadir}/%{name}/templates/*.tmpl %{_datadir}/%{name}/templates/de/*.tmpl %{_datadir}/%{name}/templates/es/*.tmpl %{_datadir}/%{name}/templates/ja/*.tmpl %{_datadir}/%{name}/templates/ru/*.tmpl %{_datadir}/%{name}/templates/pt_BR/*.tmpl %{_datadir}/locale/*/*.po #%config(noreplace) /etc/dbus-1/system.d/cups.conf %{_datadir}/%{name}/drv %{_datadir}/%{name}/examples %dir %{_datadir}/%{name}/mime %{_datadir}/%{name}/mime/mime.types* %{_datadir}/%{name}/mime/mime.convs* %dir %{_datadir}/%{name}/ppdc %{_datadir}/%{name}/ppdc/*.defs %{_datadir}/%{name}/ppdc/*.h %dir %{_datadir}/%{name}/profiles /usr/linux/bin/cupstestdsc /usr/linux/bin/cupstestppd /usr/linux/bin/ppd* /usr/linux/sbin/* %files libs %defattr(-,root,system) %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/linux/lib/*.a /usr/linux/lib/*.so* /usr/linux/lib64/*.so* %files client %defattr(-,root,system) %{_bindir}/cancel %{_bindir}/lp* %{_sbindir}/lpc %{_mandir}/man1/lp*.1* %{_mandir}/man1/cancel.1* %{_mandir}/man8/lpc.8* /usr/linux/bin/cancel /usr/linux/bin/lp* /usr/linux/sbin/lpc %files devel %defattr(-,root,system) %{_bindir}/cups-config* %{_includedir}/%{name} %{_mandir}/man1/cups-config.1* /usr/linux/bin/cups-config* /usr/linux/include/%{name} %files lpd %defattr(-,root,system) %dir %{cups_serverbin} %dir %{cups_serverbin}/daemon %{cups_serverbin}/daemon/cups-lpd %{_mandir}/man8/cups-lpd.8* %files ipptool %defattr(-,root,system) %{_bindir}/ipptool %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/ipptool %dir %{_datadir}/%{name}/ipptool/* %{_mandir}/man1/ipptool.1* %{_mandir}/man5/ipptoolfile.5* /usr/linux/bin/ipptool %changelog * Thu Mar 29 2018 Ravi Hirekurabar 2.2.3-2 - Rebuit commenting requires field to avoid Aix-rpm dependency. * Tue Feb 06 2018 Ravi Hirekurabar - 2.2.3-1 - Updated to version 2.2.3-1 * Wed Nov 30 2016 Michael Perzl - 2.2.1-1 - updated to version 2.2.1 * Tue Oct 01 2013 Michael Perzl - 1.6.4-1 - updated to version 1.6.4 * Fri Jul 12 2013 Michael Perzl - 1.6.3-1 - updated to version 1.6.3 * Mon Mar 18 2013 Michael Perzl - 1.6.2-1 - updated to version 1.6.2 * Sat Jul 28 2012 Michael Perzl - 1.6.1-1 - updated to version 1.6.1 * Thu Jul 26 2012 Michael Perzl - 1.6.0-1 - updated to version 1.6.0 * Thu Jul 26 2012 Michael Perzl - 1.5.4-1 - updated to version 1.5.4 * Wed May 16 2012 Michael Perzl - 1.5.3-1 - updated to version 1.5.3 * Mon Feb 06 2012 Michael Perzl - 1.5.2-1 - updated to version 1.5.2 * Tue Nov 08 2011 Michael Perzl - 1.5.0-1 - updated to version 1.5.0 * Tue Nov 08 2011 Michael Perzl - 1.4.8-1 - updated to version 1.4.8 * Tue Nov 08 2011 Michael Perzl - 1.4.7-1 - updated to version 1.4.7 * Tue Nov 08 2011 Michael Perzl - 1.4.6-1 - updated to version 1.4.6 * Tue Nov 08 2011 Michael Perzl - 1.4.5-1 - updated to version 1.4.5 * Tue Nov 08 2011 Michael Perzl - 1.4.4-2 - added 64-bit libraries and RTL-style libraries * Tue Aug 03 2010 Michael Perzl - 1.4.4-1 - first version for AIX V5.1 and higher