[[source]]
=== Source tips

Although the upstream tarball has all the information to build the Debian package, it is not always easy to figure out which combination of options to use.  

Also, the upstream may be more focused on the feature enhancements and may be less eager for backward compatibilities etc. which are important aspect of the Debian packaging practice.

The leveraging of information from other distributions is an option to address above issues.

If the other distribution in interest is a Debian derivative one, it is trivial to reuse it.

If the other distribution in interest is a http://en.wikipedia.org/wiki/RPM_Package_Manager[RPM] based distribution, see https://wiki.debian.org/Repackage_srcrpm[Repackage src.rpm].  

Downloading and opening of the *src.rpm* file can be done with the *rget* command.  (Place the *rget* script in your PATH.)

.rget script
----
#!/bin/sh
FCSRPM=$(basename $1)
mkdir ${FCSRPM}; cd ${FCSRPM}/
wget $1
rpm2cpio ${FCSRPM} | cpio -dium
----

Many upstream tarballs contain the SPEC file named as 'packagename'.*spec* or 'packagename'.*spec.in* used by the RPM system.  This can be used as the baseline for the Debian package, too.
