# 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 #The system independant core of Smart Package Manager Requires: smart-plugin-detectsys Requires: smart-channel-mirrors Requires: smart-plugin-channelsync #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-console Requires: smart-interface-GTK #Requires: smart-ksmarttray # RPM Backend # Requires: smart-backend-RPM Requires: smart-channel-RPM-SYS # RPM channels # #Requires: smart-channel-Red_Carpet Requires: smart-channel-RPM_DIR Requires: smart-channel-RPM_HDL Requires: smart-channel-RPM_MD Requires: smart-plugin-rpmdir #Requires: smart-channel-APT_RPM #Requires: smart-channel-URPMI #Requires: smart-channel-Yast2 # DEB Backend # #Requires: smart-backend-DEB #Requires: smart-channel-DEB_SYS # DEB Channels # #Requires: smart-channel-DEB_DIR #Requires: smart-channel-APT_DEB #Requires: smart-plugin-debdir # DEB Plugins # #Requires: smart-plugin-aptchannelsync # Slack Backend # #Requires: smart-backend-Slack #Requires: smart-channel-Slack_SYS # Slack Channels # #Requires: smart-channel-Slack_Site # 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-core %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-core %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-core %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-APT_DEB Summary: Smart Package Manager support for channels Group: Applications/System Requires: smart-core, smart-backend-DEB %description channel-APT_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-Channel-APT_DEB installs the APT_DEB channel which adds support for using APT repositories with DEB files. %package channel-APT_RPM Summary: Smart Package Manager support for channels Group: Applications/System Requires: smart-core, smart-backend-RPM %description channel-APT_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-Channel-APT_RPM installs the APT_RPM channel which adds support for using APT repositories with RPM files. %package channel-DEB_DIR Summary: Smart Package Manager support for DEB_DIR channels Group: Applications/System Requires: smart-core, smart-backend-DEB %description channel-DEB_DIR 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-DEB_DIR installs the DEB_DIR channel which adds support for using a directory of deb files. %package channel-DEB_SYS Summary: Smart Package Manager support for debian system channels Group: Applications/System Requires: smart-core, smart-backend-DEB %description channel-DEB_SYS 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-DEB_SYS installs the DEB_SYS channel which adds support for using deb system repositories. %package channel-Red_Carpet Summary: Smart Package Manager support for Red_Carpet channels Group: Applications/System Requires: smart-core, 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-RPM_DIR Summary: Smart Package Manager support for RPM_DIR channels Group: Applications/System Requires: smart-core, smart-backend-RPM %description channel-RPM_DIR 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-RPM_DIR installs the RPM_DIR channel which adds support for using RPM directory repositories. %package channel-RPM_HDL Summary: Smart Package Manager support for RPM header list channels Group: Applications/System Requires: smart-core, smart-backend-RPM %description channel-RPM_HDL 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-RPM_HDL installs the RPM_HDL channel which adds support for using RPM header list repositories. %package channel-RPM_MD Summary: Smart Package Manager support for RPM_MD channels Group: Applications/System Requires: smart-core, smart-backend-RPM %description channel-RPM_MD 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-RPM_MD installs the RPM_MD channel which adds support for using RPM metadata repositories. %package channel-RPM-SYS Summary: Smart Package Manager support for RPM System channels Group: Applications/System Requires: smart-core, smart-backend-RPM %description channel-RPM-SYS 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-RPM-SYS installs the RPM-SYS channel which adds support for using RPM System repositories. %package channel-Slack_Site Summary: Smart Package Manager support for Slack Site channels Group: Applications/System Requires: smart-core, smart-backend-Slack %description channel-Slack_Site 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-Slack_Site installs the Slack_Site channel which adds support for using Slack Site repositories. %package channel-Slack_SYS Summary: Smart Package Manager support for Slack_SYS channels Group: Applications/System Requires: smart-core, smart-backend-Slack %description channel-Slack_SYS 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-Slack_SYS installs the Slack_SYS channel which adds support for using Slack System repositories. %package channel-URPMI Summary: Smart Package Manager support for URPMI channels Group: Applications/System Requires: smart-core, 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-core, 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-mirrors Summary: Smart Package Manager support for Smart native format mirrors. Group: Applications/System Requires: smart-core %description channel-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-mirrors installs the mirrors channel which adds support for populating lists of mirrors provided in the smart native format. %package channel-up2date_mirrors Summary: Smart Package Manager support for up2date format mirrors. Group: Applications/System Requires: smart-core %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 plugin-channelsync Summary: Smart Package Manager plugin for channelsync. Group: Applications/System Requires: smart-core %description plugin-channelsync 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-channelsync installs the channelsync plugin which adds support for using channelsync. %package plugin-aptchannelsync Summary: Smart Package Manager plugin for aptchannelsync. Group: Applications/System Requires: smart-core, smart-backend-DEB %description plugin-aptchannelsync 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-aptchannelsync installs the aptchannelsync plugin which adds support for using aptchannelsync %package plugin-debdir Summary: Smart Package Manager plugin for debdir. Group: Applications/System Requires: smart-core, smart-backend-DEB %description plugin-debdir 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-debdir installs the debdir channel which adds support for using debdir. %package plugin-rpmdir Summary: Smart Package Manager plugin for rpmdir. Group: Applications/System Requires: smart-core, smart-backend-RPM %description plugin-rpmdir 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-rpmdir installs the rpmdir channel which adds support for using XXXXXX repositories. %package plugin-detectsys Summary: Smart Package Manager plugin for detectsys. Group: Applications/System Requires: smart-core %description plugin-detectsys 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-detectsys installs the detectsys channel which adds support for using detectsys. %package interface-console Summary: Smart Package Manager console/text mode Interface. Group: Applications/System Requires: smart-core %description interface-console 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-console installs the text mode interface for smart. %package interface-GTK Summary: Smart Package Manager GTK GUI Interface. Group: Applications/System Requires: smart-core 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-core %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 %files backend-RPM %defattr(-,root,root,-) %{python_sitearch}/smart/backends/rpm/* %files backend-DEB %defattr(-,root,root,-) %{python_sitearch}/smart/backends/deb/* %files backend-Slack %defattr(-,root,root,-) %{python_sitearch}/smart/backends/slack/* %files channel-APT_DEB %defattr(-,root,root,-) %{python_sitearch}/smart/channels/apt_deb.py* %{python_sitearch}/smart/channels/apt_deb_info.py* %files channel-APT_RPM %defattr(-,root,root,-) %{python_sitearch}/smart/channels/apt_rpm.py* %{python_sitearch}/smart/channels/apt_rpm_info.py* %files channel-DEB_DIR %defattr(-,root,root,-) %{python_sitearch}/smart/channels/deb_dir.py* %{python_sitearch}/smart/channels/deb_dir_info.py* %files channel-DEB_SYS %defattr(-,root,root,-) %{python_sitearch}/smart/channels/deb_sys.py* %{python_sitearch}/smart/channels/deb_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-RPM_DIR %defattr(-,root,root,-) %{python_sitearch}/smart/channels/rpm_dir.py* %{python_sitearch}/smart/channels/rpm_dir_info.py* %files channel-RPM_HDL %defattr(-,root,root,-) %{python_sitearch}/smart/channels/rpm_hdl.py* %{python_sitearch}/smart/channels/rpm_hdl_info.py* %files channel-RPM_MD %defattr(-,root,root,-) %{python_sitearch}/smart/channels/rpm_md.py* %{python_sitearch}/smart/channels/rpm_md_info.py* %files channel-RPM-SYS %defattr(-,root,root,-) %{python_sitearch}/smart/channels/rpm_sys.py* %{python_sitearch}/smart/channels/rpm_sys_info.py* %files channel-Slack_Site %defattr(-,root,root,-) %{python_sitearch}/smart/channels/slack_site.py* %{python_sitearch}/smart/channels/slack_site_info.py* %files channel-Slack_SYS %defattr(-,root,root,-) %{python_sitearch}/smart/channels/slack_sys.py* %{python_sitearch}/smart/channels/slack_sys_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-mirrors %defattr(-,root,root,-) %{python_sitearch}/smart/channels/mirrors.py* %{python_sitearch}/smart/channels/mirrors_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 plugin-channelsync %defattr(-,root,root,-) %{python_sitearch}/smart/plugins/channelsync.py* %files plugin-aptchannelsync %defattr(-,root,root,-) %{python_sitearch}/smart/plugins/aptchannelsync.py* %files plugin-debdir %defattr(-,root,root,-) %{python_sitearch}/smart/plugins/debdir.py* %files plugin-rpmdir %defattr(-,root,root,-) %{python_sitearch}/smart/plugins/rpmdir.py* %files plugin-detectsys %defattr(-,root,root,-) %{python_sitearch}/smart/plugins/detectsys.py* %files interface-console %defattr(-,root,root,-) %{python_sitearch}/smart/interfaces/text/* %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.