Changes between Version 4 and Version 5 of RpmHowToPackagers


Ignore:
Timestamp:
Sep 9, 2010, 8:59:45 PM (14 years ago)
Author:
Yuri Dario
Comment:

More packager information's

Legend:

Unmodified
Added
Removed
Modified
  • RpmHowToPackagers

    v4 v5  
    5252    --enable-python \
    5353    "--cache-file=%{_topdir}/cache/%{name}.cache"
     54
     55make %{?_smp_mflags}
    5456}}}
     57
     58In this case, ''%configure'' is another macro, and it will be expanded to add proper paths for common variables, like prefix, exec_prefix and others. Keep in mind that rpmbuild will use /@unixroot/usr as prefix, so all built software will go to the same tree layout. Also programs will be able to be executed from other drives.
     59Most of the times, the CONFIG_SHELL variable is required, otherwise bash shell will be selected if available: bash does not work very well, ash is more compatible.
     60CFLAGS will be added by rpm.
     61
     62== Install binaries ==
     63Done in the %install section: most of the times, make install is the required step,
     64
     65{{{
     66%install
     67rm -rf $RPM_BUILD_ROOT
     68make DESTDIR="$RPM_BUILD_ROOT" install
     69}}}
     70
     71DESTDIR is usually a macro supported in most recent build environments.
     72
     73== File packaging ==
     74Done in the %files section: here all required package files must be listed. While /* could be fine since it will include all files, it is better to have a detailed list, so it is easier to catch make install errors.
     75
     76{{{
     77%files
     78%defattr(-,root,root,-)
     79%{_bindir}/rpm.exe
     80%{_mandir}/man8/rpm.8*
     81%{_libdir}/rpm*.dll
     82}}}
     83
     84== Building package ==
     85When the .spec file is in place, packaging of binary files and source code can be started with
     86{{{
     87rpmbuild -ba myfile.spec
     88}}}
     89
     90Special parameters can be used instead of -ba:
     91 * -bb build only binaries
     92 * -bs build only sources
     93 * -bc compile only code and stop.
     94 * -bi install only code and stop.
     95 * -bl check file list only and stop.
     96
     97Since -bc, -bi, -bl are performing also previous steps, you can add the special option ''--short-circuit': this will skip all previous steps (rpmbuild will assume they are already ok), and do only the selected task.