# This is not defined on Fedora buildsystems %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Summary: Software Package Management Tool Name: smart Version: 1.1 Release: 58.0.1%{?dist} License: GPLv2+ Group: Applications/System URL: http://labix.org/smart/ Source0: http://labix.org/download/smart/%{name}-%{version}.tar.bz2 Source1: smart.console Source2: smart.pam Source3: smart.desktop Source4: distro.py Source5: ksmarttray.desktop # http://bazaar.launchpad.net/%7Esmartpm/smart/bugfix/diff/839/854 Patch0: 839_854.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.3 BuildRequires: gettext Requires: rpm-python >= 4.4 #Requires: smart-config #The following 'Requires:' tags determine which plugins are installed by default for a particular distribution. #This example is a suggestion for Fedora 10 # Smart User Interfaces # Requires: smart-interface-GTK #Requires: smart-ksmarttray # RPM Backend # Requires: smart-backend-RPM # RPM channels # #Requires: smart-channel-Red_Carpet #Requires: smart-channel-APT_RPM #Requires: smart-channel-URPMI #Requires: smart-channel-Yast2 # DEB Backend # #Requires: smart-backend-DEB # Slack Backend # #Requires: smart-backend-Slack # Smart Mirror Handling # #Requires: smart-channel-up2date_mirrors # Misc Utilities # Requires: smart-update %description Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. This is the core framework for Smart Package Manager. Plugins use this framework to add the functionality of particular package management systems. %package backend-RPM Summary: RPM backend for Smart Package Manager Group: Applications/System Requires: smart %description backend-RPM Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Backend-RPM installs the RPM backend which adds support for installing RPM files. %package backend-DEB Summary: DEB backend for Smart Package Manager Group: Applications/System Requires: smart %description backend-DEB Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Backend-DEB installs the DEB backend which adds support for installing DEB files. %package backend-Slack Summary: Slack backend for Smart Package Manager Group: Applications/System Requires: smart %description backend-Slack Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Backend-Slack installs the Slack backend which adds support for installing Slack files. %package channel-Red_Carpet Summary: Smart Package Manager support for Red_Carpet channels Group: Applications/System Requires: smart, smart-backend-RPM %description channel-Red_Carpet Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Channel-Red_Carpet installs the Red Carpet channel which adds support for using Red Carpet repositories. %package channel-URPMI Summary: Smart Package Manager support for URPMI channels Group: Applications/System Requires: smart, smart-backend-RPM %description channel-URPMI Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Channel-URPMI installs the URPMI channel which adds support for using URPMI repositories. %package channel-Yast2 Summary: Smart Package Manager support for Yast2 channels Group: Applications/System Requires: smart, smart-backend-RPM %description channel-Yast2 Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Channel-Yast2 installs the Yast2 channel which adds support for using Yast2 repositories. %package channel-up2date_mirrors Summary: Smart Package Manager support for up2date format mirrors. Group: Applications/System Requires: smart %description channel-up2date_mirrors Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Channel-up2dat_mirrors installs the up2date format mirror channel which adds support for using mirror lists provided in the up2date format. %package interface-GTK Summary: Smart Package Manager GTK GUI Interface. Group: Applications/System Requires: smart BuildRequires: desktop-file-utils %description interface-GTK Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Smart-Interface-GTK installs the GTK GUI interface for smart. %package update Summary: Allows execution of 'smart update' by normal users (suid) Group: Applications/System Requires: smart %description update Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. Allows the execution of 'smart update' by normal users through a special suid command. %package ksmarttray Summary: KDE tray program for watching updates with Smart Package Manager Group: Applications/System Requires: %{_bindir}/kdesu Requires: smart Requires: smart-update Requires: smart-interface-GTK BuildRequires: autoconf, automake, gcc-c++ BuildRequires: libXt-devel, libXext-devel BuildRequires: kdelibs3-devel BuildRequires: zlib-devel %description ksmarttray Smart Package Manager is a software package management tool. It can handle multiple package and repository types used on different platforms using plugins. KDE tray program for checking for updates with Smart Package Manager. %prep %setup -q %patch0 -p0 -b .bugfixes # /usr/lib is hardcoded perl -pi -e's,/usr/lib/,%{_libdir}/,' smart/const.py install -p -m 644 %{SOURCE2} . # Detect whether the system is using pam_stack if test -f /%{_lib}/security/pam_stack.so \ && ! grep "Deprecated pam_stack module" /%{_lib}/security/pam_stack.so \ 2>&1 > /dev/null; then perl -pi -e's,include(\s*)(.*),required\1pam_stack.so service=\2,' smart.pam touch -r %{SOURCE2} smart.pam fi %build CFLAGS="%{optflags}" export CFLAGS python setup.py build #build ksmarttray pushd contrib/ksmarttray make -f admin/Makefile.common %configure --disable-rpath --disable-dependency-tracking make popd # build smart-update make -C contrib/smart-update %install rm -rf %{buildroot} python setup.py install -O1 --root=%{buildroot} # make runtime directories mkdir -p %{buildroot}%{_libdir}/smart/plugins mkdir -p %{buildroot}%{_sysconfdir}/smart/channels mkdir -p %{buildroot}%{_localstatedir}/lib/smart{/packages,/channels} # usermode support ln -sf consolehelper %{buildroot}%{_bindir}/smart-root mkdir -p %{buildroot}/etc/security/console.apps mkdir -p %{buildroot}/etc/pam.d install -p -m 644 %{SOURCE1} %{buildroot}/etc/security/console.apps/smart-root install -p -m 644 smart.pam %{buildroot}/etc/pam.d/smart-root # smart-update rm -f contrib/smart-update/smart-update make -C contrib/smart-update install -p -m 4755 contrib/smart-update/smart-update %{buildroot}%{_bindir} #Install desktop file mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --vendor="" --dir %{buildroot}%{_datadir}/applications %{SOURCE3} #Install Icon mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps install -p -m 644 smart/interfaces/images/smart.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/smart.png # distro.py and distro.d support install -p -m 644 %{SOURCE4} %{buildroot}%{_libdir}/smart/ mkdir -p %{buildroot}%{_sysconfdir}/smart/distro.d #install ksmarttray make -C contrib/ksmarttray install DESTDIR=%{buildroot} \ iconsdir=%{_datadir}/icons/hicolor/48x48/apps desktop-file-install --vendor="" \ --dir %{buildroot}%{_datadir}/applications \ %{SOURCE5} #get a list of language files %find_lang %{name} %clean rm -rf %{buildroot} %files -f %{name}.lang # include only the core files here %defattr(-,root,root,-) %doc HACKING README LICENSE TODO IDEAS %{_bindir}/smart %{_libdir}/smart %{_sysconfdir}/smart %{_localstatedir}/lib/smart %{_mandir}/man8/smart.8* %{python_sitearch}/smart/*.py* %{python_sitearch}/smart/backends/__init__.py* %{python_sitearch}/smart/channels/__init__.py* %{python_sitearch}/smart/commands/*.py* %{python_sitearch}/smart/interfaces/__init__.py* %{python_sitearch}/smart/plugins/__init__.py* %{python_sitearch}/smart/util/*.py* %{python_sitearch}/smart-1.1.1-py2.5.egg-info %{python_sitearch}/smart/ccache.so %{python_sitearch}/smart/util/cdistance.so %{python_sitearch}/smart/util/ctagfile.so %{python_sitearch}/smart/interfaces/text/* %{python_sitearch}/smart/channels/mirrors.py* %{python_sitearch}/smart/channels/mirrors_info.py* %{python_sitearch}/smart/plugins/channelsync.py* %{python_sitearch}/smart/plugins/detectsys.py* %files backend-RPM %defattr(-,root,root,-) %{python_sitearch}/smart/backends/rpm/* %{python_sitearch}/smart/channels/rpm_dir.py* %{python_sitearch}/smart/channels/rpm_dir_info.py* %{python_sitearch}/smart/channels/rpm_hdl.py* %{python_sitearch}/smart/channels/rpm_hdl_info.py* %{python_sitearch}/smart/channels/rpm_md.py* %{python_sitearch}/smart/channels/rpm_md_info.py* %{python_sitearch}/smart/channels/rpm_sys.py* %{python_sitearch}/smart/channels/rpm_sys_info.py* %{python_sitearch}/smart/plugins/rpmdir.py* %{python_sitearch}/smart/channels/apt_rpm.py* %{python_sitearch}/smart/channels/apt_rpm_info.py* %files backend-DEB %defattr(-,root,root,-) %{python_sitearch}/smart/backends/deb/* %{python_sitearch}/smart/channels/deb_dir.py* %{python_sitearch}/smart/channels/deb_dir_info.py* %{python_sitearch}/smart/plugins/debdir.py* %{python_sitearch}/smart/channels/deb_sys.py* %{python_sitearch}/smart/channels/deb_sys_info.py* %{python_sitearch}/smart/channels/apt_deb.py* %{python_sitearch}/smart/channels/apt_deb_info.py* %{python_sitearch}/smart/plugins/aptchannelsync.py* %files backend-Slack %defattr(-,root,root,-) %{python_sitearch}/smart/backends/slack/* %{python_sitearch}/smart/channels/slack_site.py* %{python_sitearch}/smart/channels/slack_site_info.py* %{python_sitearch}/smart/channels/slack_sys.py* %{python_sitearch}/smart/channels/slack_sys_info.py* %files channel-Red_Carpet %defattr(-,root,root,-) %{python_sitearch}/smart/channels/red_carpet.py* %{python_sitearch}/smart/channels/red_carpet_info.py* %files channel-URPMI %defattr(-,root,root,-) %{python_sitearch}/smart/channels/urpmi.py* %{python_sitearch}/smart/channels/urpmi_info.py* %files channel-Yast2 %defattr(-,root,root,-) %{python_sitearch}/smart/channels/yast2.py* %{python_sitearch}/smart/channels/yast2_info.py* %files channel-up2date_mirrors %defattr(-,root,root,-) %{python_sitearch}/smart/channels/up2date_mirrors.py* %{python_sitearch}/smart/channels/up2date_mirrors_info.py* %files interface-GTK %defattr(-,root,root,-) %{python_sitearch}/smart/interfaces/gtk/* %{python_sitearch}/smart/interfaces/images/* %{_datadir}/applications/smart.desktop %{_datadir}/icons/hicolor/48x48/apps/smart.png #smart-root %{_bindir}/smart-root %config %{_sysconfdir}/security/console.apps/smart-root %config %{_sysconfdir}/pam.d/smart-root %files update %defattr(-,root,root,-) %{_bindir}/smart-update %files ksmarttray %defattr(-,root,root,-) %{_bindir}/ksmarttray %{_datadir}/apps/ksmarttray %{_datadir}/applications/ksmarttray.desktop %{_datadir}/icons/hicolor/48x48/apps/ksmarttray.png %changelog * Sat Jan 14 2009 Rehan Khan - 1.1-58.0.1 - Import Fedora 10 specfile. - Refactor spec file to increase modularity of install. * Sat Dec 27 2008 Axel Thimm - 1.1-58.0.1 - Rebuild with proper patch.