Difference between revisions of "Building Debian packages"

Jump to navigation Jump to search
Fixed error and completed the procedure
m
(Fixed error and completed the procedure)
Line 37: Line 37:
cd ./nxms-packaging;
cd ./nxms-packaging;
if [ -e .git ]; then
if [ -e .git ]; then
   git pull
   git pull;
else
else
   git clone http://git.netxms.org/public/netxms.git --branch develop ./
   git clone http://git.netxms.org/public/netxms.git --branch develop ./;
fi
fi
</pre>
After this modify the debian change-log to ensure you have a different version with every build (so your apt repo and servers installing the packages can differentiate newer versions).<br>
You can do this for example like this:
<pre>
dch -v `date +%Y%m%d%H%M`-1
</pre>
After changelog is modified, run:
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
./reconf;
./reconf;
./configure --with-dist;
./configure --with-dist;
make dist;
make dist;
make distclean;
make distclean;
git checkout debian/changelog;
mkdir deb_packages && true;
mkdir deb_packages && true;
mv netxms-*.tar.gz ./deb_packages
mv netxms-*.tar.gz ./deb_packages;
cd ./deb_packages
cd ./deb_packages;
rename s/netxms-/netxms_/ netxms-*.tar.gz
rename s/netxms-/netxms_/ netxms-*.tar.gz;
rename s/.tar.gz/.orig.tar.gz/ netxms_*.tar.gz
rename s/.tar.gz/.orig.tar.gz/ netxms_*.tar.gz;
tar xfz netxms_*.orig.tar.gz;
tar xfz netxms_*.orig.tar.gz;
cd netxms-*;
cd netxms-*;
dpkg-buildpackage -us -uc;
</pre>
</pre>
After this modify the change-log in 'debian/changelog'.
Here you will get an error about the upstream tarball missing like this:
 
<pre>
After changelog is modified, run:
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../netxms_201507231213.orig.tar.{bz2,gz,lzma,xz}
</pre>
Fix the tarball name (you have a netxms_*.orig.tar.gz one directory above) and you can continue.
<pre style="white-space: pre-wrap;  
<pre style="white-space: pre-wrap;  
white-space: -moz-pre-wrap;  
white-space: -moz-pre-wrap;  
184

edits

Navigation menu