为mandriva 2010 spring打包(geany-0.19.2)

今天按照官方的wiki,打包了geany-0.19.2,选择geany的原因之一是因为它是我比较青睐的一个轻型IDE(我更愿意称之为文本编辑器).

Mandriva 2010 Spring的geany 还是0.18.1的,比较老了。

 

1.  安装必须的工具rpmbuild:

 

#urpmi rpm-build

还必须安装gtk+相关的东西,因为geany依赖的是gtk+2.

 

2. 配置环境:

 

修改了官方的脚本Rpmsetup.sh:

 

#!/bin/sh if [ -f ~/.rpmrc -o -d ~/rpm ]; then echo 'Delete any existing setup before running this script' exit 1 fi cd mkdir rpm mkdir rpm/BUILD mkdir rpm/RPMS mkdir rpm/RPMS/i586 mkdir rpm/RPMS/x86_64 mkdir rpm/RPMS/noarch mkdir rpm/SOURCES mkdir rpm/SPECS mkdir rpm/SRPMS mkdir rpm/tmp cat <<END >~/.rpmrc buildarchtranslate: i386: i586 buildarchtranslate: i486: i586 buildarchtranslate: i586: i586 buildarchtranslate: i686: i586 END cat <<END >~/.rpmmacros %_topdir %(echo $HOME)/rpm %_tmppath %(echo $HOME)/rpm/tmp # If you want your packages to be GPG signed automatically, add these three lines # replacing 'Mandrivalinux' with your GPG name. You may also use rpm --resign # to sign the packages later. %_signature gpg %_gpg_name wolfpythonlondon %_gpg_path ~/.gnupg # Add your name and e-mail into the %packager field below. You may also want to # also replace vendor with yourself. %packager Walter Lewis <[email protected]> %distribution Mandriva Linux %vendor Mandriva # If you want your packages to have your own distsuffix instead of mdv, add it # here like this #%distsuffix foo END

 

执行之。

 

3.从上交的ftp上下载geany-0.18.1的src.rpm (http://ftp.sjtu.edu.cn/mandrivalinux )

获取相应的.spec

 

$rpm -i SRPMS/geany-0.18.1-1mdv2010.1.src.rpm

$ cd SPECS

修改了相应的spec文件,如下:

%define name geany %define cname Geany %define version 0.19.2 %define release 1 Summary: Small C editor using GTK2 Name: %{name} Version: %{version} Release: %mkrel %{release} License: GPLv2+ Group: Development/C URL: http://geany.uvena.de/ Source0: http://download.geany.org/%{name}-%{version}.tar.bz2 # The following tags files were retrieved 17 Aug 2009 Source1: http://download.geany.org/contrib/tags/sqlite3.c.tags Source2: http://download.geany.org/contrib/tags/std.glsl.tags Source3: http://download.geany.org/contrib/tags/gtk216.c.tags Source4: http://download.geany.org/contrib/tags/xfce46.c.tags Source5: http://download.geany.org/contrib/tags/dbus-glib-0.76.c.tags Source6: http://download.geany.org/contrib/tags/geany-api-0.19.c.tags Source7: http://download.geany.org/contrib/tags/standard.css.tags Source8: http://download.geany.org/contrib/tags/std.vala.tags BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkgconfig BuildRequires: gtk2-devel BuildRequires: desktop-file-utils BuildRequires: imagemagick BuildRequires: perl-XML-Parser BuildRequires: intltool Requires(post): desktop-file-utils Requires(postun): desktop-file-utils %description Geany is a small C editor using GTK2 with basic features of an integrated development environment. It features syntax highlighting, code completion, call tips, many supported filetypes (including C, Java, PHP, HTML, DocBook, Perl, LateX, and Bash), and symbol lists. %prep %setup -q %build %configure2_5x %make %install rm -rf $RPM_BUILD_ROOT %makeinstall # research locale file %find_lang %{name} # prepare menu # we remove the key "Version" and "Encoding" because it's invalid desktop-file-install --vendor="" / --remove-category="Application" / --add-category="GNOME" / --remove-key="Version" / --remove-key="Encoding" / --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/* # Install tags files install -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/%{name} # remove useless file rm %{buildroot}%{_datadir}/icons/hicolor/icon-theme.cache %clean rm -rf $RPM_BUILD_ROOT %if %mdkversion < 200900 %post %{update_desktop_database} %{update_menus} %endif %if %mdkversion < 200900 %postun %{clean_desktop_database} %{clean_menus} %endif %files -f %{name}.lang %defattr(-,root,root,-) %{_bindir}/%{name} %{_includedir}/%{name} %{_libdir}/%{name} %{_libdir}/pkgconfig/%{name}.pc %{_datadir}/applications/%{name}.desktop %{_datadir}/%{name} %{_defaultdocdir}/%{name} %{_mandir}/man1/%{name}.* %{_iconsdir}/hicolor/*/apps/* %changelog * Tue Dec 07 2010 Walter Lewis <[email protected]> 0.19.2-1mdv2010.1 + Revision: 700000 - No significant change - Just update to new version 0.19.2 - Test for mageia * Sun Feb 14 2010 Funda Wang <[email protected]> 0.18.1-1mdv2010.1 + Revision: 505926 - drop dup files declaration - update to new version 0.18.1 * Mon Aug 17 2009 Frederik Himpe <[email protected]> 0.18-1mdv2010.0 + Revision: 417201 - Update to new version 0.18 - Update tag files - Don't do custom installation of icons, make install now takes care of installing them in fdo icon directories * Sun May 03 2009 Frederik Himpe <[email protected]> 0.17-1mdv2010.0 + Revision: 370910 - Update to new version 0.17 - Fix license - Fix source URL - Package contrib tags files * Sun Feb 15 2009 trem <[email protected]> 0.16-1mdv2009.1 + Revision: 340646 - update to 0.16 * Sun Jan 04 2009 Jérôme Soyer <[email protected]> 0.15-1mdv2009.1 + Revision: 324737 - Fix BR - New upstream release + Oden Eriksson <[email protected]> - lowercase ImageMagick + Pixel <[email protected]> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas * Sat Apr 19 2008 trem <[email protected]> 0.14-1mdv2009.0 + Revision: 195799 - update to 0.14 + Thierry Vignaud <[email protected]> - fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake * Tue Feb 05 2008 trem <[email protected]> 0.13-1mdv2008.1 + Revision: 162874 - update to 0.13 + Olivier Blin <[email protected]> - restore BuildRoot + Thierry Vignaud <[email protected]> - kill re-definition of %%buildroot on Pixel's request * Sun Oct 14 2007 trem <[email protected]> 0.12-2mdv2008.1 + Revision: 98282 - new packaging revision - remove macro _icons16dir * Sun Oct 14 2007 Funda Wang <[email protected]> 0.12-1mdv2008.1 + Revision: 98274 - add missing icons - fix desktop entry and icons + trem <[email protected]> - remove unkown macro iconsbasedir - add BuildRequires perl-XML-Parser - update to 0.12 + Thierry Vignaud <[email protected]> - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated' - fix man pages * Mon May 21 2007 trem <[email protected]> 0.11-1mdv2008.0 + Revision: 29521 - new release 0.11 * Wed Feb 28 2007 Jérôme Soyer <[email protected]> 0.10.2-1mdv2007.0 + Revision: 127084 - New release 0.10.2 * Sat Dec 23 2006 trem <[email protected]> 0.10-1mdv2007.1 + Revision: 101854 - Add buildrequires ImageMagick - Add buildrequires desktop-file-utils - Add buildrequires gtk2-devel - Add buildrequires pkgconfig - 0.10 - Import geany * Fri Aug 11 2006 trem <[email protected]> 0.8-1mdv2007.0 - 0.8 * Thu Jul 20 2006 trem <[email protected]> 0.7.1-1mdv2007.0 - 0.7.1 - add Patch0 to fix a double free - switch to XDG menu * Mon Jun 05 2006 trem <[email protected]> 0.7-1mdv2007.0 - 0.7 * Mon May 01 2006 trem <[email protected]> 0.6-2mdk - fix packager name in changelog * Mon May 01 2006 <[email protected]> 0.6-1mdk - Initial build.

 

4.下载geany-0.19.2的源码到rpm/SOURCES 目录,还有一些相关的tags

 

http://download.geany.org/
http://download.geany.org/contrib/tags/

$rpmbuild -ba geany.spec

 

 

制作完成,详细的情况参考官方wiki:

参考:

mandriva wiki:http://wiki.mandriva.com/en/Mandriva_RPM_HOWTO

 

包已上传到

http://u.115.com/file/f556e3b970 可自行下载

 

你可能感兴趣的:(为mandriva 2010 spring打包(geany-0.19.2))