summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 48ccae807697c8166740eae53b12c82dfc575040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: Peter Dean <pjd2503 at gmail dot com>
pkgname='crypt'
pkgver='r12.1b95a9d'
pkgrel=1
pkgdesc="A public-domain replacement for the UNIX \"crypt\" command"
arch=('x86_64')
url="https://github.com/freebsd/freebsd/tree/master/usr.bin/enigma"
license=('unknown')
source=("https://raw.githubusercontent.com/freebsd/freebsd/master/usr.bin/enigma/enigma.1" 
        "https://raw.githubusercontent.com/freebsd/freebsd/master/usr.bin/enigma/enigma.c")

prepare() {
	cd $srcdir 
        sed -i '/FBSDID/d;45,48d;s/strlcpy/strncpy/;/<unistd.h>/a\
#include <crypt.h>' enigma.c
}

build() {
	cd $srcdir 
        gcc enigma.c -o crypt -lcrypt -g -Wall -O3
}

package() {
	cd $srcdir
        install -Dm 755 ./crypt $pkgdir/usr/bin/crypt
        install -Dm 644 ./enigma.1 $pkgdir/usr/share/man/man1/crypt.1
        install -Dm 644 ./enigma.1 $pkgdir/usr/share/man/man1/enigma.1
}
md5sums=('d4e4f1de06369065d2b99625d9a5e438'
         'acc3c6c9e8b7d1f24f19e53c7495b33e')