[Slackbuilds-users] A little helps with packaging C software which doesn't use make or autotools?

Sebastian Arcus s.arcus at open-t.co.uk
Fri Mar 2 11:19:59 UTC 2018


I am trying to package usbrelay (https://github.com/darrylb123/usbrelay) 
for SBo - a very useful little utility to control cheap USB relays. The 
instructions at the page above only include the following step:

# gcc -o usbrelay usbrelay.c -lhidapi-libusb

which works fine.

I'm not sure what or where to include in usbrelay.SlackBuild. Would the 
above go instead of the whole lot below?:

# Your application will probably need different configure flags;
# these are provided as an example only.
# Be sure to build only shared libraries unless there's some need for
# static.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
   --sysconfdir=/etc \
   --localstatedir=/var \
   --mandir=/usr/man \
   --docdir=/usr/doc/$PRGNAM-$VERSION \
   --build=$ARCH-slackware-linux

# Compile the application and install it into the $PKG directory
make
make install DESTDIR=$PKG



How do we replicate the "make install DESTDIR=$PKG" step?


More information about the SlackBuilds-users mailing list