📄 bleachbit.spec
字号:
%if 0%{?fedora}# FC9 doesn't define 'fedora_version' but apparently OpenSUSE Build Service's FC9 does%{!?fedora_version: %define fedora_version %fedora}%endif%if 0%{?mdkver}# Mandriva 2009 doesn't define 'mandriva_version' but apparently OpenSUSE Build Service's MDK2009 does%{!?mandriva_version: %define mandriva_version %(echo %{mdkver} | grep -o ^2...)}%endif%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}%endif%if 0%{?mandriva_version}%define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"%define python_compile python -c "import compileall; compileall.compile_dir('.')"%endif%if 0%{?suse_version}%define python_sitelib %py_sitedir%endifName: bleachbitVersion: 0.3.0Release: 1%{?dist}Summary: Remove unnecessary files, free space, and maintain privacy%if 0%{?mandriva_version}Group: File tools%elseGroup: Applications/System%endifLicense: GPLv3URL: http://bleachbit.sourceforge.netSource0: %{name}-%{version}.tar.bz2%if 0%{?mandriva_version}BuildRoot: %{_tmppath}/%{name}-%{version}%elseBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)%endifBuildArch: noarch%if 0%{?mandriva_version}BuildRequires: libpython2.5-develRequires: gnome-pythonRequires: gnome-python-gnomevfsRequires: pygtk2.0 >= 2.6Requires: usermode-consoleonlyRequires(post): desktop-file-utilsRequires(postun): desktop-file-utils%endif%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}BuildRequires: desktop-file-utilsBuildRequires: python-develRequires: gnome-python2-gnomevfsRequires: pygtk2 >= 2.6Requires: usermode%endif%if 0%{?suse_version}BuildRequires: makeBuildRequires: python-develBuildRequires: update-desktop-filesRequires: python-gnomeRequires: python-gtk >= 2.6Requires: xdg-utils%py_requires%endifRequires: python >= 2.4%descriptionBleachBit deletes unnecessary files to free valuable disk space andmaintain privacy. Rid your system of old junk including brokenmenu entries, cache, cookies, localizations, and temporary files.Designed for Linux systems, it wipes clean Bash, Beagle, Epiphany,Firefox, Flash, GNOME, Java, KDE, OpenOffice.org, Opera, RealPlayer,VIM, XChat, and more.%prep%setup -q%build%{__python} setup.py buildcp %{name}.desktop %{name}-root.desktopsed -i -e 's/Name=BleachBit$/Name=BleachBit as Administrator/g' %{name}-root.desktop%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mandriva_version}cat > bleachbit.pam <<EOF#%PAM-1.0auth include config-utilaccount include config-utilsession include config-utilEOFcat > bleachbit.console <<EOFUSER=rootPROGRAM=/usr/share/bleachbit/GUI.pySESSION=trueEOF%endif%installrm -rf $RPM_BUILD_ROOTmake install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix}%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mandriva_version}desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktopsed -i -e 's/Exec=bleachbit$/Exec=bleachbit-root/g' %{name}-root.desktopdesktop-file-install \ --dir=%{buildroot}/%{_datadir}/applications/ \ --vendor="" %{name}-root.desktop# consolehelper and userhelperln -s consolehelper %{buildroot}/%{_bindir}/%{name}-rootmkdir -p %{buildroot}/%{_sbindir}ln -s ../..%{_datadir}/%{name}/GUI.py %{buildroot}/%{_sbindir}/%{name}-rootmkdir -p %{buildroot}%{_sysconfdir}/pam.dinstall -m 644 %{name}.pam %{buildroot}%{_sysconfdir}/pam.d/%{name}-rootmkdir -p %{buildroot}%{_sysconfdir}/security/console.appsinstall -m 644 %{name}.console %{buildroot}%{_sysconfdir}/security/console.apps/%{name}-root%endif%if 0%{?suse_version}%suse_update_desktop_file %{name}sed -i -e 's/^Exec=bleachbit$/Exec=xdg-su -c bleachbit/g' %{name}-root.desktopdesktop-file-install \ --dir=%{buildroot}/%{_datadir}/applications/ \ --vendor="" %{name}-root.desktop%endifmake -C po install DESTDIR=$RPM_BUILD_ROOT%find_lang %{name}%cleanrm -rf $RPM_BUILD_ROOT%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}%postupdate-desktop-database &> /dev/null ||:%postunupdate-desktop-database &> /dev/null ||:%endif%if 0%{?mandriva_version}%post%{update_menus}%{update_desktop_database}%postun%{clean_menus}%{clean_desktop_database}%endif%files -f %{name}.lang%defattr(-,root,root,-)%doc COPYING%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mandriva_version}%config(noreplace) %{_sysconfdir}/pam.d/%{name}-root%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}-root%{_bindir}/%{name}-root%{_sbindir}/%{name}-root%endif%{_bindir}/%{name}%{_datadir}/applications/%{name}.desktop%{_datadir}/applications/%{name}-root.desktop%{_datadir}/%{name}/%{_datadir}/pixmaps/%{name}.png%changelog
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -