You are not logged in.

#1 2004-11-09 06:03:41

miasma
Member
From: Boulder, CO
Registered: 2004-11-09
Posts: 39
Website

[new] openntpd

Hi all,
Switched to arch from slack about a month ago and thought I would start contributing.
I just uploaded openntpd-3.6p1-3.src.tar.gz to incoming.
I had a few mistakes at first, (turn on passive ftp) and after two more revisions, settled on the third one.  I would love if the TURs could look at my PKGCONFIG and give me some comments.
Thanks for the great distro!

I have a few more packages in the works:
aKregator (kde rss aggregator)
baghira (kde osx theme)
kmymoney2 (kde financial management)
knemo (kde system tray network monitor)
kompose (kde desktop organizer...)
konversation (kde irc client)
openvpn -- 2.0 beta I know this is a beta, but i have been using it without any problem for a long time.  What are the issues with putting betas in incoming?
pwmanager (kde secure password management) -- not sure if i want to keep this, wallet seems really good...
vpnc (open source cisco vpn client)
cannon-smash (3d table tennis game)
ivman (haldbus automounter)

edit: added code
PKGBUILD

# Maintainer: Joshua Rubin <joshua@cybertron.cc>
pkgname=openntpd
pkgver=3.6p1
pkgrel=3
pkgdesc="OpenNTPD is a FREE, easy to use implementation of the Network Time Protocol."
url="http://www.openntpd.org"
license="BSD"
depends=('openssl' 'coreutils' 'shadow')
makedepends=('openssl' 'pacman' 'make')
conflicts=('ntp')
provides=('ntp')
backup=('etc/ntpd.conf')
install=$pkgname.install
source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz)
md5sums=('ba69427e83a9a8080410261af116cdbe')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install
  mkdir -p $startdir/pkg/etc/rc.d
  cp $startdir/openntpd $startdir/pkg/etc/rc.d
  chmod ugo+rx $startdir/pkg/etc/rc.d/openntpd
}

openntpd.install

post_install() {
  mkdir -p /var/empty
  groupadd -g 83 _ntp
  useradd -u 83 -g 83 -s /bin/false -d /var/empty -c 'OpenNTP daemon' _ntp
}

post_remove() {
  userdel _ntp
}

op=$1
shift
$op $*

openntpd (for /etc/rc.d)

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/ntpd`
case "$1" in
  start)
    stat_busy "Starting NTP Daemon"
    if [ -z "$PID" ]; then
       /usr/sbin/ntpd &
    fi
    if [ ! -z "$PID" -o $? -gt 0 ]; then
      stat_fail
    else
      add_daemon ntpd
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping NTP Daemon"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon ntpd
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac

Offline

#2 2004-11-09 06:28:35

shlo
Member
Registered: 2004-09-25
Posts: 42

Re: [new] openntpd

Nice. More contributors = more rockification. Which is not a word.

I think Baghira is already in incoming, but I could be wrong.

Offline

#3 2004-11-09 16:22:13

miasma
Member
From: Boulder, CO
Registered: 2004-11-09
Posts: 39
Website

Re: [new] openntpd

Fixed my stupid dependencies and changed to release 4

Uploaded to incoming as openntpd-3.6p1-4.src.tar.gz

PKGBUILD

# Maintainer: Joshua Rubin <joshua@cybertron.cc>
pkgname=openntpd
pkgver=3.6p1
pkgrel=4
pkgdesc="OpenNTPD is a FREE, easy to use implementation of the Network Time Protocol."
url="http://www.openntpd.org"
license="BSD"
depends=('openssl')
conflicts=('ntp')
provides=('ntp')
backup=('etc/ntpd.conf')
install=$pkgname.install
source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz)
md5sums=('ba69427e83a9a8080410261af116cdbe')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc
  make || return 1
  make DESTDIR=$startdir/pkg install
  mkdir -p $startdir/pkg/etc/rc.d
  cp $startdir/openntpd $startdir/pkg/etc/rc.d
  chmod ugo+rx $startdir/pkg/etc/rc.d/openntpd
}

the rest of the package is the same

Offline

#4 2004-11-12 00:18:11

miasma
Member
From: Boulder, CO
Registered: 2004-11-09
Posts: 39
Website

Re: [new] openntpd

I fixed a bug in the /etc/rc.d/openntpd file...

the updated file is in incoming as openntpd-3.6p1-6.src.tar.gz

here it is:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/sbin/ntpd`
case "$1" in
  start)
    stat_busy "Starting NTP Daemon"
    if [ -z "$PID" ]; then
       /usr/sbin/ntpd &
    fi
    if [ ! -z "$PID" -o $? -gt 0 ]; then
      stat_fail
    else
      add_daemon ntpd
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping NTP Daemon"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon ntpd
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac

Offline

#5 2004-11-13 00:30:22

miasma
Member
From: Boulder, CO
Registered: 2004-11-09
Posts: 39
Website

Re: [new] openntpd

Still ONE more but in the /etc/rc.d/openntpd script, fixed below, sorry!

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/sbin/ntpd`
case "$1" in
  start)
    stat_busy "Starting OpenNTPD"
    if [ -z "$PID" ]; then
       /usr/sbin/ntpd &
    fi
    if [ ! -z "$PID" -o $? -gt 0 ]; then
      stat_fail
    else
      add_daemon openntpd
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping OpenNTPD"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon openntpd
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac

Offline

Board footer

Powered by FluxBB