solbu / hldig

hl://Dig is a fork of ht://Dig, a web indexing and searching system for a small domain or intranet
https://solbu.github.io/hldig/
Other
18 stars 21 forks source link

packaging hldig for Slackware #127

Open andy5995 opened 6 years ago

andy5995 commented 6 years ago

Pretty easy to get a package submitted to http://slackbuilds.org/

It's not the official Slack repo, but it's a secondary repo for Slackware packages.

The submission doesn't include any source code or binaries, just a few files that have the info on where to download the hldig distribution from.

htdig is already included with the official Slack distribution, so there is a htdlg.Slackbuild that could be used as a template

http://slackblog.com/slackware/slackware64-14.2/source/n/htdig/htdig.SlackBuild

A slack-desc file needs to be included, and looks like this

https://mirrors.slackware.com/slackware/slackware64-14.2/source/n/htdig/slack-desc

A doinst.sh file can be included, and that looks like...

#!/bin/sh
config() {
  NEW="$1"
  OLD="`dirname $NEW`/`basename $NEW .new`"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}
config etc/htdig/htdig.conf.new

What's evenutally submitted to Slackbuilds.org would be very small file named hldig.tar.gz which contains about 5 or 6 files.

You can see an example by looking at the anacron page on Slackbuilds, and downloading anacron.tar.gz from that page.

One the tar.gz is created, it can be submitted at http://slackbuilds.org/submit/

andy5995 commented 6 years ago

Oh, and it's absolutely best to test it before submitting, which I can do for anyone who wants to work on this but doesn't have access to a Slackware installation.