You are not logged in.

#1 2009-06-30 01:31:58

doze_worm
Member
Registered: 2009-02-25
Posts: 2

sendmail PKGBUILD, help check

Hi all,
I found that the sendmail doesn't in AUR. So I wrote one yesterday.
I've tried on my own system, which is arch 64, intel.
Plz help me verify it on yours. TIA

PKGBUILD

#contributor= doze_worm <shuimao@gmail.com>
pkgname="sendmail"
pkgver=8.14.3
pkgrel=1
pkgdesc="A CLI tool for sending mail"
arch=('i686' 'x86_64')
license=(unknown)
provides=('sendmail=8.14')
conflicts=()
source=("ftp://ftp.sendmail.org/pub/sendmail/${pkgname}.${pkgver}.tar.gz")
url="http://www.sendmail.org"
depends=()
md5sums=('a5ee5d26e1f546a2da5fb9a513bd6bce')

install="${pkgname}.install"

build(){
    cd "$srcdir/${pkgname}-${pkgver}" || return 1
    mkdir -p $pkgdir/usr/bin $pkgdir/usr/man/man{1,5,8} $pkgdir/usr/sbin || return 1
    ./Build || return 1
    make DESTDIR="$pkgdir" install || return 1
}

sendmail.install

pre_install() {
    getent group smmsp >/dev/null || usr/sbin/useradd -g 25 smmsp
    getent passwd smmsp >/dev/null || usr/bin/useradd -c 'sendmail' -u 150 -g smmsp /var/spool/mail -s /bin/false smmsp
    usr/bin/passwd -l smmsp &> /dev/null
}

post_install() {
    chown smmsp.smmsp var/spool/clientmqueue -R
}

pre_delete() {
    usr/sbin/userdel smmsp &> /dev/null
}

Last edited by doze_worm (2009-06-30 01:54:59)

Offline

#2 2009-07-08 15:41:02

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: sendmail PKGBUILD, help check

# Maintainer:  doze_worm <shuimao at gmail dot com>
pkgname="sendmail"
pkgver=8.14.3
pkgrel=1
pkgdesc="A CLI tool for sending mail"
arch=('i686' 'x86_64')
license=('GPL')
provides=('sendmail=8.14')
install="${pkgname}.install"
source=("ftp://ftp.sendmail.org/pub/sendmail/${pkgname}.${pkgver}.tar.gz")
url="http://www.sendmail.org"
md5sums=('a5ee5d26e1f546a2da5fb9a513bd6bce')

build(){
    cd "$srcdir/${pkgname}-${pkgver}" || return 1
    install -d $pkgdir/usr/{bin,sbin} $pkgdir/usr/man/man{1,5,8} || return 1
    ./Build || return 1
    make DESTDIR="$pkgdir" install || return 1
}


And pls. choose http source, if possible, because ftp is not allowed everywhere, because of security reason.

Offline

#3 2009-07-23 14:19:46

VuDu
Member
Registered: 2007-05-11
Posts: 95

Re: sendmail PKGBUILD, help check

on sendmail.install shouldn't it be:

pre_install() {
    getent group smmsp >/dev/null || /usr/sbin/useradd -g 25 smmsp
    getent passwd smmsp >/dev/null || /usr/sbin/useradd -c 'sendmail' -u 150 -g smmsp /var/spool/mail -s /bin/false smmsp
    /usr/bin/passwd -l smmsp &> /dev/null
}

post_install() {
    chown smmsp.smmsp /var/spool/clientmqueue -R
}

pre_delete() {
    /usr/sbin/userdel smmsp &> /dev/null
}

?
Shouldn't it be a flag before "/var/spool/mail" ?
As for the http link, here it is: http://www.sendmail.org/ftp/sendmail.8.14.3.tar.gz

Last edited by VuDu (2009-07-23 14:45:10)

Offline

#4 2009-07-23 14:56:05

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: sendmail PKGBUILD, help check

@doze_worm: Why did you list the license as unknown?  It's included in the source tarball.  Add "install -Dm644 LICENSE /usr/share/licenses/$pkgname/LICENSE" to the PKGBUILD.

In the .install file, pre_delete should be pre_remove.

@VuDu: Either way works in this case.

Offline

#5 2009-07-23 15:14:00

VuDu
Member
Registered: 2007-05-11
Posts: 95

Re: sendmail PKGBUILD, help check

tdy wrote:

@VuDu: Either way works in this case.

You're talking about the leading slashes right? Not the missing flag or missing 's' on sbin...

Offline

#6 2009-07-23 15:31:23

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: sendmail PKGBUILD, help check

VuDu wrote:

You're talking about the leading slashes right? Not the missing flag or missing 's' on sbin...

Yes, I was referring to the leading slashes (didn't notice the bolded s).  I just didn't want to quote the whole block.

Offline

#7 2009-07-25 05:38:43

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: sendmail PKGBUILD, help check

In that case you must modify the license to custom, if it's not a common license type.

Offline

Board footer

Powered by FluxBB