From Fedora Project Wiki
fedorawe're now getting started.
fedoraSpeaker is Itamar Preis Peixoto
fedoraRPM is a compressed file with metadata information. 99% of Fedora software is delivered in RPM format.
fedoraIt's a hands-on talk, if you have your laptop and would like to try it's OK.
fedorarequired software
fedoraMost people start talking about writing a spec file, but we'll start talking about the source code and at the end you'll have an RPM file.
fedoradevelopment tools required
fedoragcc glibc-devel automake autoconf rpmdevtools mc gedit (or other text editor)
fedora(Pause while people install software...)
fedoranext we're going to write a Hello World program
fedorasource code follows
fedora#include <stdio.h>
fedoraint main(){
fedoraprintf("Fedora Flock 2013\n");
fedorareturn 0;
fedora}
* number80 (~80@fedora/number80) has joined
fedorasave this as flock.c
fedorato compile we'll use gcc
fedoragcc flock.c
fedorayou'll have the program with the name a.out
fedorayou can run it with ./a.out
fedorashould show "Welcome to Flock"
fedoraor "Fedora Flock 2013" if you followed what I typed...
* qwebirc2558 (9909a8fa@gateway/web/freenode/ip.153.9.168.250) has joined
fedoranow we're going to write a readme.txt file
fedorasave the readme.txt file
fedoranext we're going to use GNU autotools
fedorafirst run "autoscan"
fedora(this is in the "flock" directory where you have the flock.c and a.out files)
fedoraautoscan will create some files, the most important is configure.scan
fedoragoing to rename that to configure.ac
fedoraquestion: does autoscan recurse directories?
fedoraspeaker: "I don't remember now."
fedoraopen configure.ac with your text editor
* qwebirc2558 has quit (Client Quit)
fedoragoing to change the FULL-PACKAGE-NAME to flock, change VERSION to 1.0, and leave BUG-REPORT-ADDRESS as-is
fedorasave the file
fedoranow run "autoheader"
fedoranow we're going to create a makefile with gnu autotools
fedoravim Makefile.am
fedora(first letter must be uppercase)
fedorain the file
fedorabin_PROGRAMS=flock
fedoraflock_SOURCES=flock.c
fedoranow you're going to run "autoreconf -fiv"
fedoramake dist
fedora(note that you can use make dist-zip to create zipfiles for other OSes, but that's not necessary for RPMs)
fedoracan use make to compile, make clean to remove artifacts...
fedorarpmdev-newspec flock
fedorawill create an empty file (spec) for us
fedoraopen flock.spec w/your text editor
fedoranow you need to fill in the "form" with version, summary,
fedoragroup = x
fedoralicense = gpl
fedorasource0: flock-1.0.tar.gz
fedoraBuildRequires: can be left empty
fedorarpmbuiild -ba flock.spec
fedora(Might get an error b/c the source code is not in the right directory.)
fedorayou need to have the flock-1.0.tar.gz file in rpmbuild/SOURCES/
fedoraunder your home directory
fedoraso: /home/user/rpmbuild/SOURCES/
fedoraanother error b/c the spec file needs to have the files it creates listed under the %files
fedoraafter all that's correct, you'll run rpmbuild and you'll get an exit 0
fedora"in less than 5 minutes we created an RPM" when we process the spec file with rpmbuild, it saves two files, one is the .src and one is the RPM
mizmois zodbot on
mizmozodbot, #startmeeting
fedoraargh
fedorasorry
fedora:-(
mizmoits okay
fedorawe're just wrapping this one up. I can save the log

Generated by irclog2html.py 2.12.1 by <a href="mailto:marius@pov.lt">Marius Gedminas</a> - find it at <a href="http://mg.pov.lt/irclog2html/">mg.pov.lt</a>!