[Slackbuilds-users] A little helps with packaging C software which doesn't use make or autotools?
Willy Sudiarto Raharjo
willysr at slackbuilds.org
Fri Mar 2 12:00:22 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?
There's a Makefile, so you can use
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make usbrelay
make install DESTDIR=$PKG
--
Willy Sudiarto Raharjo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20180302/e16c39b0/attachment.asc>
More information about the SlackBuilds-users
mailing list