The officially official Devuan Forum!

You are not logged in.

#1 2017-03-15 18:25:50

Registered: 2017-03-11
Posts: 36  

HOWTO: Installing and configuring surf under Devuan

Hi there,

you know I have been bugging everybody in DNG with surf and suckless tools smile Please
find below a short howto that describes how to install and configure surf on Devuan Jessie.
The very same procedure (apt-get source PACKAGE && change something in the sources &&
dpkg-source commit && dpkg-buildpackage) can be used to recompile any other Devuan
package and get a new .deb package which can be installed with dpkg.



Installing and configuring surf under Devuan

0) You need to have the correct deb-src entries in your /etc/apt/sources.list, e.g.:

deb-src jessie main contrib

1) Download the surf source code package:

# apt-get source surf

This will download the sources of surf in the current directory. If you run the command from the
directory ~/packages/surf/, you should see something like:

root@******:~/packages/surf# ls 
surf-0.6  surf_0.6-1.debian.tar.xz  surf_0.6-1.dsc  surf_0.6.orig.tar.gz

2) chdir into the source directory:

# cd surf-0.6

All the configuration options are in the file config.def.h.  Open it with your preferred editor.

3) Now let's imagine that we want to change the default directory where files are downloaded by surf, setting it to "~/Downloads", and that we want to run curl in xterm instead than stterm. We should look for something like:

#define DOWNLOAD(d, r) { \
        .v = (char *[]){ "/bin/sh", "-c", \
                "stterm -e /bin/sh -c \"curl -J -O --user-agent '$1'" \

we will replace the line:

"stterm -e /bin/sh -c \"curl -J -O --user-agent '$1'" \


"xterm -e /bin/sh -c \"cd ~/Downloads/; curl -J -O --user-agent '$1'" \

4) When you are done with your changes, you need to install the changes as a patch, so you save the file and run:

# dpkg-source --commit

You will be asked to provide a description for this patch.

5) Now you should give:

# dpkg-buildpackage

If the command complains about missing dependencies, just apt-get install the needed stuff, and then give "dpkg-buildpackage" again.

6) When dpkg-buildpackage is done, you will find the debian package in:

# ../surf_0.6-1_amd64.deb

which can be installed with:

# dpkg -i surf_0.6-1_amd64.deb

7) The same procedure above can be used to recompile any package in the De**an repos.

Last edited by KatolaZ (2017-03-15 18:26:18)


Board footer