Rpm
From Attie's Wiki
(Difference between revisions)
m |
m |
||
Line 17: | Line 17: | ||
Release: 1 | Release: 1 | ||
License: LGPL | License: LGPL | ||
− | BuildRequires: make, gcc, binutils, coreutils, gzip, man2html | + | #BuildRequires: make, gcc, binutils, coreutils, gzip, man2html |
Group: System/Libraries | Group: System/Libraries | ||
− | Source: | + | Source: libxbee3-3.0.6.tgz |
BuildRoot: /ver/tmp/${name}-buildroot | BuildRoot: /ver/tmp/${name}-buildroot | ||
Line 44: | Line 44: | ||
%files | %files | ||
− | /usr/lib/libxbee. | + | /usr/lib/libxbee.a |
/usr/lib/libxbee.a.3.0.6 | /usr/lib/libxbee.a.3.0.6 | ||
+ | /usr/lib/libxbee.so | ||
+ | /usr/lib/libxbee.so.3.0.6 | ||
/usr/lib/libxbee.so.3.0.6.dbg | /usr/lib/libxbee.so.3.0.6.dbg | ||
/usr/share/man/man3/libxbee_revision.3.gz | /usr/share/man/man3/libxbee_revision.3.gz |
Revision as of 17:25, 30 May 2012
Building an RPM package
Create the following directory structure:
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuildrpm/SPECS
Create a tar file containing the source code, named like so: <packagename>-<version>.tgz
tar -cavf ~/rpmbuild/SOURCES/mylib-1.0.1.tgz --transform='#^#mylib-1.0.1/#s' *.c *.h makefile
Create a *.spec file using the following template:
Summary: C library to aid the use of Digi XBee radios in API mode Name: libxbee3 Version: 3.0.6 Release: 1 License: LGPL #BuildRequires: make, gcc, binutils, coreutils, gzip, man2html Group: System/Libraries Source: libxbee3-3.0.6.tgz BuildRoot: /ver/tmp/${name}-buildroot %description C library to aid the use of Digi XBee radios in API mode %prep %setup -q %build make configure make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/include mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/share/man/man3 sudo SYS_ROOT=$RPM_BUILD_ROOT make install %clean rm -rf $RPM_BUILD_ROOT %files /usr/lib/libxbee.a /usr/lib/libxbee.a.3.0.6 /usr/lib/libxbee.so /usr/lib/libxbee.so.3.0.6 /usr/lib/libxbee.so.3.0.6.dbg /usr/share/man/man3/libxbee_revision.3.gz /usr/share/man/man3/xbee_pktDataGet.3.gz /usr/share/man/man3/xbee_conSleepGet.3.gz /usr/share/man/man3/xbee_conInfoGet.3.gz /usr/share/man/man3/libxbee.3.gz /usr/share/man/man3/xbee_logLevelGet.3.gz /usr/share/man/man3/xbee_conPurge.3.gz /usr/share/man/man3/xbee_conCallbackGet.3.gz /usr/share/man/man3/xbee_log.3.gz /usr/share/man/man3/xbee_conNew.3.gz /usr/share/man/man3/xbee_pkt.3.gz /usr/share/man/man3/xbee_errorToStr.3.gz /usr/share/man/man3/xbee_modeGetList.3.gz /usr/share/man/man3/xbee_netStart.3.gz /usr/share/man/man3/xbee_attachEOFCallback.3.gz /usr/share/man/man3/xbee_conRx.3.gz /usr/share/man/man3/xbee_conDataGet.3.gz /usr/share/man/man3/xbee_pktValidate.3.gz /usr/share/man/man3/xbee_setup.3.gz /usr/share/man/man3/xbee_conSettings.3.gz /usr/share/man/man3/xbee_conGetTypes.3.gz /usr/share/man/man3/xbee_conTx.3.gz /usr/share/man/man3/xbee_conAddress.3.gz /usr/include/xbee.h %changelog * Wed May 30 2012 Attie Grande <attie@attie.co.uk> - created RPM build infrastructure