Building xsane into an RPM
1) Download xsane-0.94.tar.gz
2) Check your build "optflags" in terminal
rpm --eval '%{optflags}'
should see something like this:
-02 -march=i486 -mcpu=i686
3) Check your Top Directory (this is where your build takes place) in terminal
rpm --eval '%{_topdir}'
should see something like this:
/usr/src/packages
4) In terminal cd /usr/src/packages
ls -1F /usr/src/packages
should have:
BUILD/
RPMS/
SOURCES/
SPECS/
SRPMS/
5)As Root, Copy source xsane-0.94.tar.gz to /usr/src/packages/SOURCES
(I also extracted mine there, for quick reference - but you don't have to)
6)As Root, Open the xsane-0.94 folder that was created when you extracted the files, copy xsane.spec to /usr/src/packages/SPECS
7)As Root, Edit /usr/src/packages/SPECS/xsane.spec
I edited the following:
version 0.94
Requires sane (not sane-backends)
Build Requires gtk+ >= 1.2.0 (I deleted sane-backends-dev >=1.0.2)
add vendor - make your own name (under Build Requires)
add Packager - your name & email address (under Build Requires)
8) As Root, cd /usr/src/packages/SPECS
rpm -bb xsane.spec
This will build it & place a copy of the build under /usr/src/packages/BUILD, it will also place a copy of the rpm under /usr/src/packages/RPMS under i386(it won't show any items intially outside the i386 folder, until you open it- I don't know why)
9)As Root, Install RPM
cd /usr/src/packages/RPMS/i386
rpm -i xsane-0.94-1.i386.rpm
|