2

Is there a way to set configuration options for packages or Makefiles being run while apt-get is installing software?

I'm currently installing freetds-dev by running apt-get install freetds-dev tdsodbc

For the freetds-dev package I'd like to set the --with-open-ssl=OPEN_SSL_DIR option during the configuration step. It seems like common enough of a need that the standard install tools would provide hooks for it...but it doesn't look like it from the man pages and google.

Am I stuck writing the full install/uninstall script manually rather than just sudo apt-get? Or is there a way around it?

3

In general, this is not possible. Developers use different tools, languages, installation scripts. Some packages use autoconf, some don't. Some take options, some need a modification of a Makefile or of a shell or perl script.

You can download the source package (apt-get source package), modify it, compile and install the modified version. It is quite simple. Say, package name is freetds.

  1. Get the stuff necessary to build the package.

    apt-get build-dep freetds
    
  2. Get the package source

    apt-get source freetds
    
  3. Now a directory called freetds-0.91 has been created. Enter the directory and do necessary modifications.

  4. Recompile the package.

    cd freetds-0.91
    dpkg-buildpackage -rfakeroot -uc -b
    
  5. Install the new package using dpkg. The new package name will be something like freetds-dev_0.91-3_[architecture].deb, for example freetds-dev_0.91-3_amd64.deb.

    cd ..
    sudo dpkg -i freetds-0.91-3_amd64.deb
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.