Edited by and based on the lectures of Tero.Karvinen at iki.fi Whole document (c) 2003 Karvinen and others GNU Free Documentation Licence = = = 3.RPM PAKETOINTI - Ville Laakso alkuun asensin RPMmien tekoon tarkoitetun ohjelman: [root@ville]# apt-get install rpm-build Tämä jäleen loin /home/ville kansion alle tiedoston .rpmmacros, jonne talletin seuraavanlaisen litanian: $HOME/.rpmmacros %packager Ville Laakso %_topdir /home/ville/rpmbuild %_rpmtopdir %{_topdir}/%{name} %_builddir %{_rpmtopdir}/BUILD %_rpmdir %{_rpmtopdir} %_sourcedir %{_rpmtopdir} %_specdir %{_rpmtopdir} %_srcrpmdir %{_rpmtopdir} %_tmppath %{_rpmtopdir}/TMP %_buildroot %{_tmppath}/%{name}-root Tämän jälkeen, loin kansiot /home/ville/rpmbuild/nano, /home/ville/rpmbuild/nano/BUILD ja /home/ville/rpmbuild/nano/TMP. Downloadasin netistä nano-1.2.0-1.src.rpm paketin ja ajoin sen rpmbuild kansion alla seuraavalla komennolla: rpm2cpio nano-1.2.0-1.src.rpm |cpio -dvi. Ohjelma purkautui ja teki mm. Nano.spec tiedoston nano kansioon. Editoin tiedostoa, ja lopputulos on seuraavanlainen : %define name nano %define ver 1.2.0 %define rel 1 Summary : Pico editor clone with enhancements Name : %{name} Version : %{ver} Release : %{rel} Copyright : GPL Group : Console/Editors URL : http://www.nano-editor.org Source : http://www.nano-editor.org/dist/v1.2/%{name}-%{ver}.tar.gz BuildRoot : /var/tmp/%{name}-buildroot Requires : ncurses %description GNU nano is a small and friendly text editor. It aims to emulate the Pico text editor while also offering a few enhancements. %prep %setup -q %build %configure --enable-all make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %install rm -rf "$RPM_BUILD_ROOT" make DESTDIR="$RPM_BUILD_ROOT" install %files %defattr(-,root,root) %doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO nanorc.sample %{_bindir}/nano %{_mandir}/*/* %{_datadir}/locale/*/LC_MESSAGES/nano.mo %{_infodir}/nano.info* %changelog * Sat Mar 30 2002 Chris Allegretta - Accepted into main distribution - Added Packager and URL tage from original spec file. * Tue Mar 06 2002 Brett Pemberton Initial spec-file Tämän jälkeen annoin komennon rpbmbuild -ba nano.spec, joka käänsi ja paketoi Nanon. Ohjelma loi nano kansion alle mm. I386 hakemiston, jonne paketti nimeltä nano-1.2.0-1.i386.rpm ilmestyi. Rpm myös asentui hyvin. Copyright (c) 2003 Ville Laakso. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". = = =