I am building a package – a custom version of ruby 1.9.3. I would like to take some steps before building the package on the target system, namely:
apt-get install developer-build-gnu-make
apt-get install system-library-math-header-math
apt-get install developer-library-lint
mkdir /usr/bin/trash; mv /usr/bin/make /usr/bin/trash/make; ln -s /usr/bin/gmake /usr/bin/make
Where in the debian/rules file would I put those lines, so that they are run before ./configure?
Adding package installation:
These actions can be solved easily using the
Build-Depends:
field in your control file.Creating and moving stuff:
You shouldn't modify the user system using scripts yourself. dpkg keeps track of changes done to the system so when it uninstalls the package the system is as it was before the package installation. If your package needs to be built using root account you are doing it wrong. The best way is to modify the way dh-make is called (that if you use dh-make) so it uses gmake instead, or change the
configure
file.