aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-07-19 16:15:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-07-19 16:15:40 +0000
commitbf04f16d7e5ed54e3af1425ef6a7b7dd5c34fc0c (patch)
tree8a945a6b93bc247d3d131c48e33ba9a8db4a4be5
parentcb6a79e43338a70e2962b8b38b59a9000fd9c0d2 (diff)
parent6b686a9c7df44a3fa088b139e9852424de23869f (diff)
downloadalpine_aports-bf04f16d7e5ed54e3af1425ef6a7b7dd5c34fc0c.tar.bz2
alpine_aports-bf04f16d7e5ed54e3af1425ef6a7b7dd5c34fc0c.tar.xz
alpine_aports-bf04f16d7e5ed54e3af1425ef6a7b7dd5c34fc0c.zip
Merge remote branch 'amanison/master'
-rw-r--r--.gitignore7
-rw-r--r--Makefile69
-rwxr-xr-xaport.lua244
-rw-r--r--main/apr-util/APKBUILD2
-rw-r--r--main/chrony/APKBUILD4
-rw-r--r--main/dhcp/APKBUILD2
-rw-r--r--main/dialog/APKBUILD12
-rw-r--r--main/heimdal/APKBUILD2
-rw-r--r--main/libconfig/APKBUILD6
-rw-r--r--main/libxfce4menu/APKBUILD2
-rw-r--r--main/linux-grsec/APKBUILD6
-rw-r--r--main/linux-pae/APKBUILD6
-rw-r--r--main/linux-vserver/APKBUILD12
-rw-r--r--main/openssl/openssl-0.9.8k-padlock-sha.patch821
-rw-r--r--main/procps/01-fix-install-options-for-busybox.patch65
-rw-r--r--main/procps/APKBUILD11
-rw-r--r--main/snort/APKBUILD10
-rw-r--r--main/wpa_supplicant/APKBUILD6
-rw-r--r--main/xbitmaps/APKBUILD (renamed from main/xbitmap/APKBUILD)0
-rwxr-xr-xmakeall.sh8
-rwxr-xr-xrebuild-alpine.sh85
-rw-r--r--testing/mutt/APKBUILD50
22 files changed, 572 insertions, 858 deletions
diff --git a/.gitignore b/.gitignore
index 9ef5555f12..9d9743a234 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,13 @@
1*.apk 1*.apk
2*.gz 2*.gz
3*.tgz
3*.bz2 4*.bz2
5*.tbz2
6*.zip
4src 7src
5pkg 8pkg
6pkg-* 9pkg-*
10main/vim/7.2.*
11main_*.txt
12testing_*.txt
13unstable_*.txt
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..67eb3daaec
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,69 @@
1.PHONY: main testing non-free unstable
2
3rootdir := $(shell pwd)
4
5all: main testing non-free unstable
6
7apkbuilds := $(shell find . -maxdepth 3 -name APKBUILD -print)
8
9all-pkgs := $(sort $(subst ./,,$(patsubst %/,%,$(dir $(apkbuilds)))))
10
11main-pkgs := $(shell ./aport.lua deplist $(rootdir) main)
12
13testing-pkgs := $(shell ./aport.lua deplist $(rootdir) testing)
14
15non-free-pkgs := $(shell ./aport.lua deplist $(rootdir) non-free)
16
17unstable-pkgs := $(shell ./aport.lua deplist $(rootdir) unstable)
18
19main:
20 for p in $(main-pkgs) ; \
21 do \
22 cd $(rootdir)/$@/$$p; \
23 abuild -r; \
24 done
25
26testing:
27 for p in $(testing-pkgs) ; \
28 do \
29 cd $(rootdir)/$@/$$p; \
30 abuild -r; \
31 done
32
33non-free:
34 for p in $(non-free-pkgs) ; \
35 do \
36 cd $(rootdir)/$@/$$p; \
37 abuild -r; \
38 done
39
40unstable:
41 for p in $(unstable-pkgs) ; \
42 do \
43 cd $(rootdir)/$@/$$p; \
44 abuild -r; \
45 done
46
47clean:
48 for p in $(all-pkgs) ; do \
49 cd $(rootdir)/$$p; \
50 abuild clean; \
51 abuild cleanpkg; \
52 done
53
54fetch:
55 for p in $(all-pkgs) ; do \
56 cd $(rootdir)/$$p; \
57 abuild fetch; \
58 done
59
60distclean:
61 for p in $(all-pkgs) ; \
62 do \
63 cd $(rootdir)/$$p; \
64 abuild clean; \
65 abuild cleanoldpkg; \
66 abuild cleanpkg; \
67 abuild cleancache; \
68 done
69
diff --git a/aport.lua b/aport.lua
new file mode 100755
index 0000000000..71113475af
--- /dev/null
+++ b/aport.lua
@@ -0,0 +1,244 @@
1#!/usr/bin/lua
2
3
4-- those should be read from some config file
5aportsdir = "~/aports"
6repos = { "main", "testing" }
7
8
9function split(str)
10 local t = {}
11 if (str == nil) then
12 return nil
13 end
14 for e in string.gmatch(str, "%S+") do
15 table.insert(t, e)
16 end
17 return t
18end
19
20function split_apkbuild(line)
21 local r = {}
22 local dir, pkgname, pkgver, pkgrel, depends, makedepends, subpackages, source = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)")
23 r.dir = dir
24 r.pkgname = pkgname
25 r.pkgver = pkgver
26 r.pkgrel = pkgrel
27 r.depends = split(depends)
28 r.makedepends = split(makedepends)
29 r.subpackages = split(subpackages)
30 r.source = split(source)
31 return r
32end
33
34-- parse the APKBUILDs and return a list
35function parse_apkbuilds(dir, repos)
36 local i,v, p
37 local str=""
38 if repos == nil then
39 return
40 end
41 --expand repos
42 for i,v in ipairs(repos) do
43 str = str..dir.."/"..v.."/*/APKBUILD "
44 end
45
46 local p = io.popen([[
47 for i in ]]..str..[[; do
48 pkgname=
49 pkgver=
50 pkgrel=
51 depends=
52 makedepends=
53 subpackages=
54 source=
55 dir="${i%/APKBUILD}"
56 cd "$dir"
57 . ./APKBUILD
58 echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$depends\|$makedepends\|$subpackages\|$source
59 done
60 ]])
61 return function()
62 local line = p:read("*line")
63 if line == nil then
64 p:close()
65 return nil
66 end
67 return split_apkbuild(line)
68 end
69end
70
71function target_packages(pkgdb, pkgname)
72 local i,v
73 local t = {}
74 for i,v in ipairs(pkgdb[pkgname]) do
75 table.insert(t, pkgname.."-"..v.pkgver.."-r"..v.pkgrel..".apk")
76 end
77 return t
78end
79
80function list_depends( pkg, pkgdb )
81 local dl = {}
82 local s
83 if pkg and not pkg.added then
84 pkg.added = true
85
86 if pkg.depends then
87 for i,v in ipairs(pkg.depends) do
88 --print("v = <"..v..">")
89 s = list_depends( pkgdb[v], pkgdb )
90 if #s > 0 then
91 dl[#dl + 1] = s
92 end
93 end
94 end
95 if pkg.makedepends then
96 for i,v in ipairs(pkg.makedepends) do
97 --print("v = {"..v.."}")
98 s = list_depends( pkgdb[v], pkgdb )
99 if #s > 0 then
100 dl[#dl + 1] = s
101 end
102 end
103 end
104 dl[#dl + 1] = pkg.pkgname
105 end
106
107 s = table.concat(dl," ")
108 --print("s = ["..s.."]")
109 return s
110end
111
112function init_apkdb(aportsdir, repos)
113 local pkgdb = {}
114 local revdeps = {}
115 local a
116
117 for a in parse_apkbuilds(aportsdir, repos) do
118 -- io.write(a.pkgname.." "..a.pkgver.."\t"..a.dir.."\n")
119 if pkgdb[a.pkgname] == nil then
120 pkgdb[a.pkgname] = {}
121 end
122 --table.insert(pkgdb[a.pkgname], a)
123 pkgdb[a.pkgname] = a
124 --print("pk "..a.pkgname.." is a "..type(a).." ("..pkgdb[a.pkgname].pkgname..")")
125 -- add subpackages to package db
126 local k,v
127 for k,v in ipairs(a.subpackages) do
128 if pkgdb[v] == nil then
129 pkgdb[v] = {}
130 end
131 --table.insert(pkgdb[v], a)
132 pkgdb[v] = a
133 end
134 -- add to reverse dependencies
135 for k,v in ipairs(a.makedepends) do
136 if revdeps[v] == nil then
137 revdeps[v] = {}
138 end
139 table.insert(revdeps[v], a)
140 end
141 end
142 return pkgdb, revdeps
143end
144
145-- PKGBUILD import
146function split_pkgbuild(line)
147 local r = {}
148 local pkgname, pkgver = string.match(line, "([^|]*)|([^|]*)")
149 r.pkgname = pkgname
150 r.pkgver = pkgver
151 return r
152end
153
154function parse_pkgbuilds(dir, repos)
155 local i,v, p
156 local str=""
157 if repos == nil then
158 return
159 end
160 --expand repos
161 for i,v in ipairs(repos) do
162 str = str..dir.."/"..v.."/*/PKGBUILD "
163 end
164
165 local p = io.popen([[/bin/bash -c '
166 for i in ]]..str..[[; do
167 pkgname=
168 pkgver=
169 source $i
170 echo $pkgname\|$pkgver
171 done
172 ' 2>/dev/null
173 ]])
174 return function()
175 local line = p:read("*line")
176 if line == nil then
177 p:close()
178 return nil
179 end
180 return split_pkgbuild(line)
181 end
182end
183
184function init_absdb(dir, repos)
185 local p
186 local db = {}
187 for p in parse_pkgbuilds(dir, repos) do
188 if db[p.pkgname] == nil then
189 db[p.pkgname] = {}
190 end
191 table.insert(db[p.pkgname], p.pkgver)
192 end
193 return db
194end
195
196
197-- Applets -----------------------
198applet = {}
199function applet.revdep(arg)
200 local pkg = arg[2]
201 if pkg == nil then
202 -- usage?
203 return nil
204 end
205 local apkdb, rev = init_apkdb(aportsdir, repos)
206 local _,p
207 for _,p in ipairs(rev[pkg] or {}) do
208 print(p.pkgname)
209 end
210end
211--absdb = init_absdb("/var/abs", { "core", "extra", "community" })
212
213function applet.deplist(arg)
214 local apkdb, rev = init_apkdb(arg[2],{ arg[3] })
215
216 local deplist = {}
217 local nm,pk
218 for nm,pk in pairs(apkdb) do
219 local dl
220 --print("pk "..nm.." is a "..type(pk).." ("..apkdb[nm].pkgname..")")
221 --deplist[#deplist + 1] = "***"
222 dl = list_depends(pk,apkdb)
223 -- print("deplist for "..nm..": "..deplist)
224 if #dl > 0 then
225 deplist[#deplist + 1] = dl
226 end
227 end
228 print(table.concat(deplist," "))
229end
230
231cmd = arg[1]
232
233if cmd == nil then
234 -- usage
235 io.stderr:write( "no command given\n" );
236 return
237end
238
239if type(applet[cmd]) == "function" then
240 applet[cmd](arg)
241else
242 io.stderr:write(cmd..": invalid applet\n")
243end
244
diff --git a/main/apr-util/APKBUILD b/main/apr-util/APKBUILD
index d97674ae68..9b8d15407b 100644
--- a/main/apr-util/APKBUILD
+++ b/main/apr-util/APKBUILD
@@ -7,7 +7,7 @@ url="http://apr.apache.org/"
7license="APACHE" 7license="APACHE"
8depends= 8depends=
9subpackages="$pkgname-dev" 9subpackages="$pkgname-dev"
10makedepends="apr-dev expat-dev e2fsprogs-dev" 10makedepends="apr-dev expat-dev e2fsprogs-dev bash"
11source="http://www.apache.org/dist/apr/$pkgname-$pkgver.tar.bz2" 11source="http://www.apache.org/dist/apr/$pkgname-$pkgver.tar.bz2"
12 12
13build() { 13build() {
diff --git a/main/chrony/APKBUILD b/main/chrony/APKBUILD
index b83a0e853d..cc0696605a 100644
--- a/main/chrony/APKBUILD
+++ b/main/chrony/APKBUILD
@@ -3,12 +3,12 @@ pkgname=chrony
3pkgver=1.23 3pkgver=1.23
4pkgrel=6 4pkgrel=6
5pkgdesc="NTP client and server programs" 5pkgdesc="NTP client and server programs"
6url="http://chrony.sunsite.dk/" 6url="http://chrony.tuxfamily.org/"
7license="GPL-2" 7license="GPL-2"
8depends="logrotate" 8depends="logrotate"
9makedepends="texinfo" 9makedepends="texinfo"
10subpackages="$pkgname-doc" 10subpackages="$pkgname-doc"
11source="http://www.sfr-fresh.com/linux/misc/chrony-$pkgver.tar.gz 11source="http://download.tuxfamily.org/chrony/$pkgname-$pkgver.tar.gz
12 $pkgname-1.20-conf.c-gentoo.diff 12 $pkgname-1.20-conf.c-gentoo.diff
13 $pkgname-1.20-chrony.conf.example-gentoo.diff 13 $pkgname-1.20-chrony.conf.example-gentoo.diff
14 $pkgname-1.21-makefile.diff 14 $pkgname-1.21-makefile.diff
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD
index 622902c10e..caf32b7685 100644
--- a/main/dhcp/APKBUILD
+++ b/main/dhcp/APKBUILD
@@ -10,7 +10,7 @@ depends=
10makedepends= 10makedepends=
11install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade" 11install="dhcp.pre-install dhcp.post-install dhcp.pre-upgrade dhcp.post-upgrade"
12subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay" 12subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay"
13source="http://ftp.isc.org/isc/dhcp/$pkgname-$_realver.tar.gz 13source="http://ftp.isc.org/isc/dhcp/dhcp-4.1-history/$pkgname-$_realver.tar.gz
14 linux_ipv6_discover.patch 14 linux_ipv6_discover.patch
15 dhcp-3.0-fix-perms.patch 15 dhcp-3.0-fix-perms.patch
16 dhcrelay.initd 16 dhcrelay.initd
diff --git a/main/dialog/APKBUILD b/main/dialog/APKBUILD
index 5c6703dc92..1035f0d442 100644
--- a/main/dialog/APKBUILD
+++ b/main/dialog/APKBUILD
@@ -1,8 +1,8 @@
1# Contributor: Michael Mason <ms13sp@gmail.com> 1# Contributor: Michael Mason <ms13sp@gmail.com>
2# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 2# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3pkgname=dialog 3pkgname=dialog
4pkgver=1.1.20080819 4pkgver=1.1.20100428
5_ver=${pkgver%.*}-${pkgver##*.} 5_pkgver=1.1-20100428
6pkgrel=1 6pkgrel=1
7pkgdesc="A script-interpreter which provides a set of curses" 7pkgdesc="A script-interpreter which provides a set of curses"
8url="http://invisible-island.net/dialog/dialog.html" 8url="http://invisible-island.net/dialog/dialog.html"
@@ -11,10 +11,10 @@ depends=
11makedepends="ncurses-dev" 11makedepends="ncurses-dev"
12install= 12install=
13subpackages="$pkgname-doc" 13subpackages="$pkgname-doc"
14source="ftp://invisible-island.net/dialog/$pkgname.tar.gz" 14source="ftp://ftp.us.debian.org/debian/pool/main/d/$pkgname/dialog_$_pkgver.orig.tar.gz"
15 15
16build() { 16build() {
17 cd "$srcdir/$pkgname-$_ver" 17 cd "$srcdir/$pkgname-$_pkgver"
18 ./configure --prefix=/usr \ 18 ./configure --prefix=/usr \
19 --sysconfdir=/etc \ 19 --sysconfdir=/etc \
20 --mandir=/usr/share/man \ 20 --mandir=/usr/share/man \
@@ -23,8 +23,8 @@ build() {
23} 23}
24 24
25package() { 25package() {
26 cd "$srcdir/$pkgname-$_ver" 26 cd "$srcdir/$pkgname-$_pkgver"
27 make DESTDIR="$pkgdir" install 27 make DESTDIR="$pkgdir" install
28} 28}
29 29
30md5sums="3caebd641a9f337b980becb4444336c5 dialog.tar.gz" 30md5sums="519c0a0cbac28ddb992111ec2c3f82aa dialog_1.1-20100428.orig.tar.gz"
diff --git a/main/heimdal/APKBUILD b/main/heimdal/APKBUILD
index 92a0eda1c0..1bf4d91fc1 100644
--- a/main/heimdal/APKBUILD
+++ b/main/heimdal/APKBUILD
@@ -12,7 +12,7 @@ makedepends="gawk readline-dev e2fsprogs-dev>=1.41.9-r2 sqlite-dev autoconf auto
12install= 12install=
13subpackages="$pkgname-doc $pkgname-dev $pkgname-ftp $pkgname-telnet \ 13subpackages="$pkgname-doc $pkgname-dev $pkgname-ftp $pkgname-telnet \
14$pkgname-su $pkgname-rsh $pkgname-rcp $pkgname-pagsh $pkgname-kf" 14$pkgname-su $pkgname-rsh $pkgname-rcp $pkgname-pagsh $pkgname-kf"
15source="http://www.h5l.org/dist/src/$pkgname-$pkgver.tar.gz 15source="http://ftp4.de.freesbie.org/pub/misc/heimdal/src/$pkgname-$pkgver.tar.gz
16001_all_heimdal-no_libedit.patch 16001_all_heimdal-no_libedit.patch
17002_all_heimdal-fPIC.patch 17002_all_heimdal-fPIC.patch
18003_all_heimdal-rxapps.patch 18003_all_heimdal-rxapps.patch
diff --git a/main/libconfig/APKBUILD b/main/libconfig/APKBUILD
index e153c6fb65..db88ca1ca7 100644
--- a/main/libconfig/APKBUILD
+++ b/main/libconfig/APKBUILD
@@ -1,7 +1,7 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=libconfig 2pkgname=libconfig
3pkgver=1.4.1 3pkgver=1.4.5
4pkgrel=2 4pkgrel=0
5pkgdesc="a simple library for manipulating structured configuration files" 5pkgdesc="a simple library for manipulating structured configuration files"
6url="http://www.hyperrealm.com/libconfig/" 6url="http://www.hyperrealm.com/libconfig/"
7license='LGPL' 7license='LGPL'
@@ -24,4 +24,4 @@ package() {
24 make -j1 DESTDIR="$pkgdir/" install 24 make -j1 DESTDIR="$pkgdir/" install
25} 25}
26 26
27md5sums="7b2885272802b3ace56d3c8b445a4588 libconfig-1.4.1.tar.gz" 27md5sums="f2219e1b2501e7296a7d3e971c63666a libconfig-1.4.5.tar.gz"
diff --git a/main/libxfce4menu/APKBUILD b/main/libxfce4menu/APKBUILD
index 7ba2bd6d5d..52a0b32e99 100644
--- a/main/libxfce4menu/APKBUILD
+++ b/main/libxfce4menu/APKBUILD
@@ -9,7 +9,7 @@ depends=
9subpackages="$pkgname-dev $pkgname-doc" 9subpackages="$pkgname-dev $pkgname-doc"
10makedepends="libxfce4util-dev intltool pkgconfig gtk+-dev gettext-dev 10makedepends="libxfce4util-dev intltool pkgconfig gtk+-dev gettext-dev
11 libiconv-dev" 11 libiconv-dev"
12source="http://mocha.xfce.org/archive/xfce-$pkgver/src/$pkgname-$pkgver.tar.bz2" 12source="http://i386.miwibox.org/distfiles/xfce4/$pkgname-$pkgver.tar.bz2"
13 13
14build () { 14build () {
15 cd "$srcdir"/$pkgname-$pkgver 15 cd "$srcdir"/$pkgname-$pkgver
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index efd0e36a50..07993f9654 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=2.6.32.16 5pkgver=2.6.32.16
6_kernver=2.6.32 6_kernver=2.6.32
7pkgrel=2 7pkgrel=3
8pkgdesc="Linux kernel with grsecurity" 8pkgdesc="Linux kernel with grsecurity"
9url=http://grsecurity.net 9url=http://grsecurity.net
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -99,13 +99,13 @@ dev() {
99 # kernel modules and install those as /usr/src/linux-headers, 99 # kernel modules and install those as /usr/src/linux-headers,
100 # simlar to what ubuntu does 100 # simlar to what ubuntu does
101 # 101 #
102 # this way you dont need to install the 300-400 kernel sources to 102 # this way you dont need to install the 300-400 kernel sources to
103 # build a tiny kernel module 103 # build a tiny kernel module
104 # 104 #
105 pkgdesc="Headers and script for third party modules for grsec kernel" 105 pkgdesc="Headers and script for third party modules for grsec kernel"
106 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release} 106 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
107 107
108 # first we import config, run prepare to set up for building 108 # first we import config, run prepare to set up for building
109 # external modules, and create the scripts 109 # external modules, and create the scripts
110 mkdir -p "$dir" 110 mkdir -p "$dir"
111 cp "$srcdir"/$_config "$dir"/.config 111 cp "$srcdir"/$_config "$dir"/.config
diff --git a/main/linux-pae/APKBUILD b/main/linux-pae/APKBUILD
index cfaa725493..2617081935 100644
--- a/main/linux-pae/APKBUILD
+++ b/main/linux-pae/APKBUILD
@@ -4,7 +4,7 @@ _flavor=pae
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=2.6.32.15 5pkgver=2.6.32.15
6_kernver=2.6.32 6_kernver=2.6.32
7pkgrel=0 7pkgrel=1
8pkgdesc="Linux kernel with PAE enabled" 8pkgdesc="Linux kernel with PAE enabled"
9url=http://www.kernel.org 9url=http://www.kernel.org
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -96,13 +96,13 @@ dev() {
96 # kernel modules and install those as /usr/src/linux-headers, 96 # kernel modules and install those as /usr/src/linux-headers,
97 # simlar to what ubuntu does 97 # simlar to what ubuntu does
98 # 98 #
99 # this way you dont need to install the 300-400 kernel sources to 99 # this way you dont need to install the 300-400 kernel sources to
100 # build a tiny kernel module 100 # build a tiny kernel module
101 # 101 #
102 pkgdesc="Headers and script for third party modules for grsec kernel" 102 pkgdesc="Headers and script for third party modules for grsec kernel"
103 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release} 103 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
104 104
105 # first we import config, run prepare to set up for building 105 # first we import config, run prepare to set up for building
106 # external modules, and create the scripts 106 # external modules, and create the scripts
107 mkdir -p "$dir" 107 mkdir -p "$dir"
108 cp "$srcdir"/$_config "$dir"/.config 108 cp "$srcdir"/$_config "$dir"/.config
diff --git a/main/linux-vserver/APKBUILD b/main/linux-vserver/APKBUILD
index d9aaf94794..912954526a 100644
--- a/main/linux-vserver/APKBUILD
+++ b/main/linux-vserver/APKBUILD
@@ -5,7 +5,7 @@ pkgname=linux-${_flavor}
5pkgver=2.6.32.16 5pkgver=2.6.32.16
6 6
7_kernver=2.6.32 7_kernver=2.6.32
8pkgrel=0 8pkgrel=1
9pkgdesc="Linux kernel with vserver" 9pkgdesc="Linux kernel with vserver"
10url="http://linux-vserver.org/" 10url="http://linux-vserver.org/"
11depends="mkinitfs linux-firmware" 11depends="mkinitfs linux-firmware"
@@ -37,7 +37,7 @@ prepare() {
37 37
38 mkdir -p "$srcdir"/build 38 mkdir -p "$srcdir"/build
39 cp "$srcdir"/$_config "$srcdir"/build/.config 39 cp "$srcdir"/$_config "$srcdir"/build/.config
40 make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="$CC" \ 40 make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="${CC:-gcc}" \
41 silentoldconfig 41 silentoldconfig
42} 42}
43 43
@@ -64,7 +64,7 @@ package() {
64 INSTALL_PATH="$pkgdir"/boot 64 INSTALL_PATH="$pkgdir"/boot
65 65
66 rm -f "$pkgdir"/lib/modules/${_abi_release}/build \ 66 rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
67 "$pkgdir"/lib/modules/${_abi_release}/source 67 "$pkgdir"/lib/modules/${_abi_release}/source
68 rm -rf "$pkgdir"/lib/firmware 68 rm -rf "$pkgdir"/lib/firmware
69 69
70 install -D include/config/kernel.release \ 70 install -D include/config/kernel.release \
@@ -76,17 +76,17 @@ dev() {
76 # kernel modules and install those as /usr/src/linux-headers, 76 # kernel modules and install those as /usr/src/linux-headers,
77 # simlar to what ubuntu does 77 # simlar to what ubuntu does
78 # 78 #
79 # this way you dont need to install the 300-400 kernel sources to 79 # this way you dont need to install the 300-400 kernel sources to
80 # build a tiny kernel module 80 # build a tiny kernel module
81 # 81 #
82 pkgdesc="Headers and script for third party modules for grsec kernel" 82 pkgdesc="Headers and script for third party modules for grsec kernel"
83 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release} 83 local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
84 84
85 # first we import config, run prepare to set up for building 85 # first we import config, run prepare to set up for building
86 # external modules, and create the scripts 86 # external modules, and create the scripts
87 mkdir -p "$dir" 87 mkdir -p "$dir"
88 cp "$srcdir"/$_config "$dir"/.config 88 cp "$srcdir"/$_config "$dir"/.config
89 make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \ 89 make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
90 silentoldconfig prepare scripts 90 silentoldconfig prepare scripts
91 91
92 # remove the stuff that poits to real sources. we want 3rd party 92 # remove the stuff that poits to real sources. we want 3rd party
diff --git a/main/openssl/openssl-0.9.8k-padlock-sha.patch b/main/openssl/openssl-0.9.8k-padlock-sha.patch
deleted file mode 100644
index b2e7e954d6..0000000000
--- a/main/openssl/openssl-0.9.8k-padlock-sha.patch
+++ /dev/null
@@ -1,821 +0,0 @@
1#
2# OpenSSL patch to support VIA C7 hash engine
3# Written by: Timo Teras <timo.teras@iki.fi>
4# based on patch by: Michal Ludvig <michal@logix.cz>
5# http://www.logix.cz/michal/devel/padlock
6#
7Index: openssl-0.9.8k/crypto/engine/eng_padlock.c
8===================================================================
9--- openssl-0.9.8k.orig/crypto/engine/eng_padlock.c 2009-07-27 16:18:20.000000000 +0300
10+++ openssl-0.9.8k/crypto/engine/eng_padlock.c 2009-07-30 22:02:54.000000000 +0300
11@@ -1,10 +1,13 @@
12-/*
13+/*
14 * Support for VIA PadLock Advanced Cryptography Engine (ACE)
15 * Written by Michal Ludvig <michal@logix.cz>
16 * http://www.logix.cz/michal
17 *
18- * Big thanks to Andy Polyakov for a help with optimization,
19- * assembler fixes, port to MS Windows and a lot of other
20+ * SHA support by Timo Teras <timo.teras@iki.fi> based on code
21+ * originally by Michal Ludvig.
22+ *
23+ * Big thanks to Andy Polyakov for a help with optimization,
24+ * assembler fixes, port to MS Windows and a lot of other
25 * valuable work on this engine!
26 */
27
28@@ -66,6 +69,13 @@
29 #include <stdio.h>
30 #include <string.h>
31
32+#include <signal.h>
33+#include <stdint.h>
34+#include <unistd.h>
35+#include <sys/mman.h>
36+#include <sys/ucontext.h>
37+#include <arpa/inet.h>
38+
39 #include <openssl/opensslconf.h>
40 #include <openssl/crypto.h>
41 #include <openssl/dso.h>
42@@ -74,12 +84,23 @@
43 #ifndef OPENSSL_NO_AES
44 #include <openssl/aes.h>
45 #endif
46+#ifndef OPENSSL_NO_SHA
47+#include <openssl/sha.h>
48+#endif
49 #include <openssl/rand.h>
50 #include <openssl/err.h>
51
52 #ifndef OPENSSL_NO_HW
53 #ifndef OPENSSL_NO_HW_PADLOCK
54
55+/* PadLock RNG is disabled by default */
56+#define PADLOCK_NO_RNG 1
57+
58+/* No ASM routines for SHA in MSC yet */
59+#ifdef _MSC_VER
60+#define OPENSSL_NO_SHA
61+#endif
62+
63 /* Attempt to have a single source for both 0.9.7 and 0.9.8 :-) */
64 #if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
65 # ifndef OPENSSL_NO_DYNAMIC_ENGINE
66@@ -96,7 +117,7 @@
67 /* VIA PadLock AES is available *ONLY* on some x86 CPUs.
68 Not only that it doesn't exist elsewhere, but it
69 even can't be compiled on other platforms!
70-
71+
72 In addition, because of the heavy use of inline assembler,
73 compiler choice is limited to GCC and Microsoft C. */
74 #undef COMPILE_HW_PADLOCK
75@@ -138,20 +159,42 @@
76 static int padlock_init(ENGINE *e);
77
78 /* RNG Stuff */
79+#ifndef PADLOCK_NO_RNG
80 static RAND_METHOD padlock_rand;
81+#endif
82
83 /* Cipher Stuff */
84 #ifndef OPENSSL_NO_AES
85 static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
86 #endif
87
88+/* Digest Stuff */
89+#ifndef OPENSSL_NO_SHA
90+static int padlock_digests(ENGINE *e, const EVP_MD **digest, const int **nids, int nid);
91+static volatile void *padlock_cached_sha_buffer = NULL;
92+#endif
93+
94 /* Engine names */
95 static const char *padlock_id = "padlock";
96 static char padlock_name[100];
97
98 /* Available features */
99-static int padlock_use_ace = 0; /* Advanced Cryptography Engine */
100-static int padlock_use_rng = 0; /* Random Number Generator */
101+enum padlock_flags {
102+ PADLOCK_RNG = 0x01,
103+ PADLOCK_ACE = 0x02,
104+ PADLOCK_ACE2 = 0x04,
105+ PADLOCK_PHE = 0x08,
106+ PADLOCK_PMM = 0x10
107+};
108+enum padlock_flags padlock_flags;
109+
110+#define PADLOCK_HAVE_RNG (padlock_flags & PADLOCK_RNG)
111+#define PADLOCK_HAVE_ACE (padlock_flags & (PADLOCK_ACE|PADLOCK_ACE2))
112+#define PADLOCK_HAVE_ACE1 (padlock_flags & PADLOCK_ACE)
113+#define PADLOCK_HAVE_ACE2 (padlock_flags & PADLOCK_ACE2)
114+#define PADLOCK_HAVE_PHE (padlock_flags & PADLOCK_PHE)
115+#define PADLOCK_HAVE_PMM (padlock_flags & PADLOCK_PMM)
116+
117 #ifndef OPENSSL_NO_AES
118 static int padlock_aes_align_required = 1;
119 #endif
120@@ -165,25 +208,30 @@
121 /* Check available features */
122 padlock_available();
123
124-#if 1 /* disable RNG for now, see commentary in vicinity of RNG code */
125- padlock_use_rng=0;
126-#endif
127-
128 /* Generate a nice engine name with available features */
129 BIO_snprintf(padlock_name, sizeof(padlock_name),
130- "VIA PadLock (%s, %s)",
131- padlock_use_rng ? "RNG" : "no-RNG",
132- padlock_use_ace ? "ACE" : "no-ACE");
133+ "VIA PadLock: %s%s%s%s%s",
134+ padlock_flags ? "" : "not supported",
135+ PADLOCK_HAVE_RNG ? "RNG " : "",
136+ PADLOCK_HAVE_ACE ? (PADLOCK_HAVE_ACE2 ? "ACE2 " : "ACE ") : "",
137+ PADLOCK_HAVE_PHE ? "PHE " : "",
138+ PADLOCK_HAVE_PMM ? "PMM " : "");
139
140- /* Register everything or return with an error */
141+ /* Register everything or return with an error */
142 if (!ENGINE_set_id(e, padlock_id) ||
143 !ENGINE_set_name(e, padlock_name) ||
144
145- !ENGINE_set_init_function(e, padlock_init) ||
146+ !ENGINE_set_init_function(e, padlock_init)
147 #ifndef OPENSSL_NO_AES
148- (padlock_use_ace && !ENGINE_set_ciphers (e, padlock_ciphers)) ||
149+ || (PADLOCK_HAVE_ACE && !ENGINE_set_ciphers (e, padlock_ciphers))
150 #endif
151- (padlock_use_rng && !ENGINE_set_RAND (e, &padlock_rand))) {
152+#ifndef OPENSSL_NO_SHA
153+ || (PADLOCK_HAVE_PHE && !ENGINE_set_digests (e, padlock_digests))
154+#endif
155+#ifndef PADLOCK_NO_RNG
156+ || (PADLOCK_HAVE_RNG && !ENGINE_set_RAND (e, &padlock_rand))
157+#endif
158+ ) {
159 return 0;
160 }
161
162@@ -213,7 +261,7 @@
163 static int
164 padlock_init(ENGINE *e)
165 {
166- return (padlock_use_rng || padlock_use_ace);
167+ return (padlock_flags);
168 }
169
170 /* This stuff is needed if this ENGINE is being compiled into a self-contained
171@@ -247,7 +295,7 @@
172 #define AES_KEY_SIZE_192 24
173 #define AES_KEY_SIZE_256 32
174
175-/* Here we store the status information relevant to the
176+/* Here we store the status information relevant to the
177 current context. */
178 /* BIG FAT WARNING:
179 * Inline assembler in PADLOCK_XCRYPT_ASM()
180@@ -306,7 +354,7 @@
181 {
182 int result = -1;
183
184- /* We're checking if the bit #21 of EFLAGS
185+ /* We're checking if the bit #21 of EFLAGS
186 can be toggled. If yes = CPUID is available. */
187 asm volatile (
188 "pushf\n"
189@@ -322,7 +370,7 @@
190 "xorl %%eax, %%ecx\n"
191 "movl %%ecx, %0\n"
192 : "=r" (result) : : "eax", "ecx");
193-
194+
195 return (result == 0);
196 }
197
198@@ -365,10 +413,22 @@
199 : "+a"(eax), "=d"(edx) : : "ecx");
200
201 /* Fill up some flags */
202- padlock_use_ace = ((edx & (0x3<<6)) == (0x3<<6));
203- padlock_use_rng = ((edx & (0x3<<2)) == (0x3<<2));
204+ padlock_flags |= ((edx & (0x3<<3)) ? PADLOCK_RNG : 0);
205+ padlock_flags |= ((edx & (0x3<<7)) ? PADLOCK_ACE : 0);
206+ padlock_flags |= ((edx & (0x3<<9)) ? PADLOCK_ACE2 : 0);
207+ padlock_flags |= ((edx & (0x3<<11)) ? PADLOCK_PHE : 0);
208+ padlock_flags |= ((edx & (0x3<<13)) ? PADLOCK_PMM : 0);
209
210- return padlock_use_ace + padlock_use_rng;
211+ return padlock_flags;
212+}
213+
214+static inline void
215+padlock_htonl_block(uint32_t *data, size_t count)
216+{
217+ while (count--) {
218+ asm volatile ("bswapl %0" : "+r"(*data));
219+ data++;
220+ }
221 }
222
223 #ifndef OPENSSL_NO_AES
224@@ -377,17 +437,14 @@
225 padlock_bswapl(AES_KEY *ks)
226 {
227 size_t i = sizeof(ks->rd_key)/sizeof(ks->rd_key[0]);
228- unsigned int *key = ks->rd_key;
229+ uint32_t *key = (uint32_t*) ks->rd_key;
230
231- while (i--) {
232- asm volatile ("bswapl %0" : "+r"(*key));
233- key++;
234- }
235+ padlock_htonl_block(key, i);
236 }
237 #endif
238
239 /* Force key reload from memory to the CPU microcode.
240- Loading EFLAGS from the stack clears EFLAGS[30]
241+ Loading EFLAGS from the stack clears EFLAGS[30]
242 which does the trick. */
243 static inline void
244 padlock_reload_key(void)
245@@ -423,7 +480,7 @@
246 }
247
248 /* Template for padlock_xcrypt_* modes */
249-/* BIG FAT WARNING:
250+/* BIG FAT WARNING:
251 * The offsets used with 'leal' instructions
252 * describe items of the 'padlock_cipher_data'
253 * structure.
254@@ -475,7 +532,7 @@
255 * In case you wonder 'rep xcrypt*' instructions above are *not*
256 * affected by the Direction Flag and pointers advance toward
257 * larger addresses unconditionally.
258- */
259+ */
260 static inline unsigned char *
261 padlock_memcpy(void *dst,const void *src,size_t n)
262 {
263@@ -501,7 +558,7 @@
264 _asm _emit 0x0f _asm _emit 0xa7 \
265 _asm _emit code
266
267-/* BIG FAT WARNING:
268+/* BIG FAT WARNING:
269 * The offsets used with 'lea' instructions
270 * describe items of the 'padlock_cipher_data'
271 * structure.
272@@ -840,7 +897,7 @@
273 return 1;
274 }
275
276-/*
277+/*
278 * Simplified version of padlock_aes_cipher() used when
279 * 1) both input and output buffers are at aligned addresses.
280 * or when
281@@ -895,7 +952,7 @@
282 # error "insane PADLOCK_CHUNK..."
283 #endif
284
285-/* Re-align the arguments to 16-Bytes boundaries and run the
286+/* Re-align the arguments to 16-Bytes boundaries and run the
287 encryption function itself. This function is not AES-specific. */
288 static int
289 padlock_aes_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg,
290@@ -1157,6 +1214,514 @@
291
292 #endif /* OPENSSL_NO_AES */
293
294+#ifndef OPENSSL_NO_SHA
295+
296+#define DIGEST_DATA(ctx) ((struct padlock_digest_data *)(ctx->md_data))
297+#define PADLOCK_SHA_ALIGN(dd) (uint32_t*)(((uintptr_t)(dd) + 15) & ~15)
298+#define PADLOCK_SHA_PAGES 14
299+#define PADLOCK_SHA_BUFFER (512 - sizeof(size_t) - 4*sizeof(void*))
300+#define PADLOCK_SHA_INITVECTOR_SIZE (8 * sizeof(uint32_t))
301+
302+struct padlock_digest_data {
303+ union {
304+ unsigned char smallbuffer[PADLOCK_SHA_BUFFER];
305+ struct {
306+ unsigned char padlockctx[128+16];
307+ unsigned char *buffer;
308+ size_t mmap_size;
309+ uint64_t total;
310+ };
311+ };
312+ void *initvector;
313+ size_t used;
314+ void (*hash)(void *padlockctx, const void *buf, size_t len);
315+ int (*update)(EVP_MD_CTX *ctx, const void *buffer, size_t len);
316+ int (*final)(EVP_MD_CTX *ctx, unsigned char *buffer);
317+};
318+
319+static inline void *
320+padlock_atomic_xchg(volatile void **mem, void *fixed)
321+{
322+ /* No lock prefix due the xchg asserts it anyway, and the
323+ * funny unsigned long* cast is required to workaround some gcc
324+ * problems if compiling in PIC mode */
325+ asm volatile (
326+ "xchg %0, %1"
327+ : "=r"(fixed)
328+ : "m"(*(unsigned long*)mem), "0"(fixed)
329+ : "memory");
330+ return fixed;
331+}
332+
333+static void
334+padlock_do_sha1(void *padlockctx, const void *buf, size_t len)
335+{
336+ asm volatile (
337+ "xsha1"
338+ : "+S"(buf), "+D"(padlockctx)
339+ : "c"(len), "a"(0));
340+}
341+
342+static void
343+padlock_do_sha256(void *padlockctx, const void *buf, size_t len)
344+{
345+ asm volatile (
346+ "xsha256"
347+ : "+S"(buf), "+D"(padlockctx)
348+ : "c"(len), "a"(0));
349+}
350+
351+static void
352+handle_sigsegv(int sig, siginfo_t *info, void *uctxp)
353+{
354+ ucontext_t *uctx = uctxp;
355+ uctx->uc_mcontext.gregs[14] += 4;
356+}
357+
358+static void
359+padlock_sha_nonfinalizing(struct padlock_digest_data *data)
360+{
361+ struct sigaction act, oldact;
362+ size_t bofs = 0;
363+
364+ if (data->used != data->mmap_size) {
365+ bofs = data->mmap_size - data->used;
366+ memmove(&data->buffer[bofs], data->buffer, data->used);
367+ }
368+
369+ memset(&act, 0, sizeof(act));
370+ act.sa_sigaction = handle_sigsegv;
371+ act.sa_flags = SA_SIGINFO;
372+ sigaction(SIGSEGV, &act, &oldact);
373+ data->hash(PADLOCK_SHA_ALIGN(data->padlockctx),
374+ &data->buffer[bofs], data->used + 64);
375+ sigaction(SIGSEGV, &oldact, NULL);
376+}
377+
378+static void
379+padlock_free_buffer(void *buf)
380+{
381+ buf = padlock_atomic_xchg(&padlock_cached_sha_buffer, buf);
382+ if (buf != NULL) {
383+ munmap(buf, (PADLOCK_SHA_PAGES + 1) * getpagesize());
384+ }
385+}
386+
387+static void *
388+padlock_allocate_buffer(size_t *maxsize)
389+{
390+ void *buf;
391+ size_t size, page;
392+
393+ page = getpagesize();
394+ buf = padlock_atomic_xchg(&padlock_cached_sha_buffer, NULL);
395+ if (buf != NULL)
396+ goto ret;
397+
398+ size = (PADLOCK_SHA_PAGES + 1) * page;
399+ buf = mmap(0, size, PROT_READ | PROT_WRITE,
400+ MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
401+ if (buf == NULL)
402+ return NULL;
403+
404+ /* Try locking the pages to avoid swapping, but don't fail if
405+ * we are over quota. */
406+ mlock(buf, size);
407+
408+ if (mprotect(buf + PADLOCK_SHA_PAGES * page, page, PROT_NONE) < 0) {
409+ munmap(buf, size);
410+ return NULL;
411+ }
412+
413+ret:
414+ *maxsize = PADLOCK_SHA_PAGES * page - 64;
415+
416+ return buf;
417+}
418+
419+static int
420+padlock_multi_update(EVP_MD_CTX *ctx, const void *data, size_t len)
421+{
422+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
423+ size_t chunk_size;
424+
425+ if (ddata->buffer == NULL)
426+ ddata->buffer = padlock_allocate_buffer(&ddata->mmap_size);
427+
428+ while (len) {
429+ if (ddata->used + len < ddata->mmap_size) {
430+ memcpy(&ddata->buffer[ddata->used], data, len);
431+ ddata->used += len;
432+ ddata->total += len;
433+ return 1;
434+ }
435+
436+ chunk_size = ddata->mmap_size - ddata->used;
437+ memcpy(&ddata->buffer[ddata->used], data, chunk_size);
438+
439+ data += chunk_size;
440+ len -= chunk_size;
441+ ddata->used = ddata->mmap_size;
442+ ddata->total += chunk_size;
443+ padlock_sha_nonfinalizing(ddata);
444+ ddata->used = 0;
445+ }
446+
447+ return 1;
448+}
449+
450+static int
451+padlock_oneshot_final(EVP_MD_CTX *ctx, unsigned char *md)
452+{
453+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
454+ size_t size = EVP_MD_CTX_size(ctx);
455+
456+ memcpy(md, PADLOCK_SHA_ALIGN(ddata->padlockctx), size);
457+ return 1;
458+}
459+
460+static int
461+padlock_copy_final(EVP_MD_CTX *ctx, unsigned char *md)
462+{
463+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
464+ char padlockctx[128+16];
465+ void *aligned = PADLOCK_SHA_ALIGN(padlockctx);
466+ size_t size = EVP_MD_CTX_size(ctx);
467+
468+ memcpy(aligned, ddata->initvector, PADLOCK_SHA_INITVECTOR_SIZE);
469+ ddata->hash(aligned, ddata->smallbuffer, ddata->used);
470+ padlock_htonl_block(aligned, size / sizeof(uint32_t));
471+ memcpy(md, aligned, size);
472+
473+ return 1;
474+}
475+
476+static int
477+padlock_multi_final(EVP_MD_CTX *ctx, unsigned char *md)
478+{
479+ static const char padding[64] = { 0x80, };
480+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
481+ size_t mdsize = EVP_MD_CTX_size(ctx);
482+ void *aligned = PADLOCK_SHA_ALIGN(ddata->padlockctx);
483+
484+ if (ddata->used == ddata->total) {
485+ /* Sweet, everything fits in one buffer. */
486+ ddata->hash(aligned, ddata->buffer, ddata->used);
487+ } else {
488+ /* Hardware already hashed some buffers.
489+ * Do finalizing manually */
490+ union {
491+ uint64_t u64;
492+ uint32_t u32[2];
493+ } bits_le, bits;
494+ size_t lastblocklen, padlen;
495+
496+ /* BigEndianise the length. */
497+ bits_le.u64 = ddata->total * 8;
498+ bits.u32[1] = htonl(bits_le.u32[0]);
499+ bits.u32[0] = htonl(bits_le.u32[1]);
500+
501+ /* Append padding, leave space for length. */
502+ lastblocklen = ddata->total & 63;
503+ padlen = (lastblocklen < 56) ? (56 - lastblocklen) : ((64+56) - lastblocklen);
504+ padlock_multi_update(ctx, padding, padlen);
505+
506+ /* Length in BigEndian64 */
507+ padlock_multi_update(ctx, (const char *) &bits, sizeof(bits));
508+
509+ /* And finally calculate it */
510+ padlock_sha_nonfinalizing(ddata);
511+ }
512+ padlock_htonl_block(aligned, mdsize / sizeof(uint32_t));
513+ memcpy(md, aligned, mdsize);
514+
515+ return 1;
516+}
517+
518+static int
519+padlock_copy_update(EVP_MD_CTX *ctx, const void *data, size_t len)
520+{
521+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
522+
523+ if (ddata->used + len > sizeof(ddata->smallbuffer)) {
524+ ddata->update = padlock_multi_update;
525+ ddata->final = padlock_multi_final;
526+
527+ if (ddata->used != 0) {
528+ void *buffer;
529+ size_t mmap_size;
530+
531+ buffer = padlock_allocate_buffer(&mmap_size);
532+ memcpy(buffer, ddata->smallbuffer, ddata->used);
533+ ddata->buffer = buffer;
534+ ddata->total = ddata->used;
535+ ddata->mmap_size = mmap_size;
536+ } else {
537+ ddata->buffer = NULL;
538+ ddata->total = 0;
539+ }
540+
541+ memcpy(PADLOCK_SHA_ALIGN(ddata->padlockctx), ddata->initvector,
542+ PADLOCK_SHA_INITVECTOR_SIZE);
543+
544+ return padlock_multi_update(ctx, data, len);
545+ }
546+
547+ memcpy(&ddata->smallbuffer[ddata->used], data, len);
548+ ddata->used += len;
549+
550+ return 1;
551+}
552+
553+static int
554+padlock_oneshot_update(EVP_MD_CTX *ctx, const void *data, size_t len)
555+{
556+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
557+ void *aligned = PADLOCK_SHA_ALIGN(ddata->padlockctx);
558+ size_t mdsize = EVP_MD_CTX_size(ctx);
559+
560+ /* Oneshot update is only possible if context flags indicate so */
561+ if (!(ctx->flags & EVP_MD_CTX_FLAG_ONESHOT)) {
562+ ddata->update = padlock_copy_update;
563+ ddata->final = padlock_copy_final;
564+ return padlock_copy_update(ctx, data, len);
565+ }
566+
567+ memcpy(aligned, ddata->initvector, PADLOCK_SHA_INITVECTOR_SIZE);
568+ ddata->hash(aligned, data, len);
569+ padlock_htonl_block(aligned, mdsize / sizeof(uint32_t));
570+ ddata->used += len;
571+
572+ return 1;
573+}
574+
575+static int
576+padlock_sha_init(struct padlock_digest_data *ddata)
577+{
578+ ddata->used = 0;
579+ ddata->update = padlock_oneshot_update;
580+ ddata->final = padlock_oneshot_final;
581+
582+ return 1;
583+}
584+
585+static int
586+padlock_sha1_init(EVP_MD_CTX *ctx)
587+{
588+ static uint32_t sha1_initvector[8] = {
589+ 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476,
590+ 0xC3D2E1F0
591+ };
592+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
593+
594+ ddata->hash = padlock_do_sha1;
595+ ddata->initvector = sha1_initvector;
596+ return padlock_sha_init(ddata);
597+}
598+
599+static int
600+padlock_sha224_init(EVP_MD_CTX *ctx)
601+{
602+ static uint32_t sha224_initvector[] = {
603+ 0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939,
604+ 0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4,
605+ };
606+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
607+
608+ ddata->hash = padlock_do_sha256;
609+ ddata->initvector = sha224_initvector;
610+ return padlock_sha_init(ddata);
611+}
612+
613+static int
614+padlock_sha256_init(EVP_MD_CTX *ctx)
615+{
616+ static uint32_t sha256_initvector[] = {
617+ 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
618+ 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19
619+ };
620+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
621+
622+ ddata->hash = padlock_do_sha256;
623+ ddata->initvector = sha256_initvector;
624+ return padlock_sha_init(ddata);
625+}
626+
627+static int
628+padlock_sha_update(EVP_MD_CTX *ctx, const void *data, size_t length)
629+{
630+ return DIGEST_DATA(ctx)->update(ctx, data, length);
631+}
632+
633+static int
634+padlock_sha_final(EVP_MD_CTX *ctx, unsigned char *md)
635+{
636+ return DIGEST_DATA(ctx)->final(ctx, md);
637+}
638+
639+static int
640+padlock_sha_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from)
641+{
642+ struct padlock_digest_data *dfrom = DIGEST_DATA(from);
643+ struct padlock_digest_data *dto = DIGEST_DATA(to);
644+
645+ /* When we get here, dto is already a memcpied from dfrom,
646+ * it's ok for all other cases except when data is on a separate
647+ * mmapped area. It would be nice if we had a flag, if this is
648+ * a "finalization copy", so we could do finalizing SHA here and
649+ * store the result to *to precalculated. But there's no such
650+ * flag as to is reset on copy. */
651+
652+ if (dfrom->update != padlock_copy_update) {
653+ /* Recopy the context, as they might have different alignment */
654+ memcpy(PADLOCK_SHA_ALIGN(dto->padlockctx),
655+ PADLOCK_SHA_ALIGN(dfrom->padlockctx),
656+ PADLOCK_SHA_INITVECTOR_SIZE);
657+ }
658+
659+ if (dfrom->update == padlock_multi_update) {
660+ /* Update total, and copy the buffer */
661+ dto->total = dfrom->total - dfrom->used;
662+ dto->buffer = NULL;
663+ dto->used = 0;
664+ dto->mmap_size = 0;
665+ if (dfrom->used != 0)
666+ padlock_sha_update(to, dfrom->buffer, dfrom->used);
667+ }
668+
669+ return 1;
670+}
671+
672+static int
673+padlock_sha_cleanup(EVP_MD_CTX *ctx)
674+{
675+ struct padlock_digest_data *ddata = DIGEST_DATA(ctx);
676+
677+ if (ddata->update == padlock_multi_update && ddata->buffer != NULL)
678+ padlock_free_buffer(ddata->buffer);
679+
680+ return 1;
681+}
682+
683+static const EVP_MD padlock_sha1_md = {
684+ NID_sha1,
685+ NID_sha1WithRSAEncryption,
686+ SHA_DIGEST_LENGTH,
687+ 0,
688+ padlock_sha1_init,
689+ padlock_sha_update,
690+ padlock_sha_final,
691+ padlock_sha_copy,
692+ padlock_sha_cleanup,
693+ EVP_PKEY_RSA_method,
694+ SHA_CBLOCK,
695+ sizeof(struct padlock_digest_data),
696+};
697+
698+static const EVP_MD padlock_dss1_md = {
699+ NID_dsa,
700+ NID_dsaWithSHA1,
701+ SHA_DIGEST_LENGTH,
702+ 0,
703+ padlock_sha1_init,
704+ padlock_sha_update,
705+ padlock_sha_final,
706+ padlock_sha_copy,
707+ padlock_sha_cleanup,
708+ EVP_PKEY_DSA_method,
709+ SHA_CBLOCK,
710+ sizeof(struct padlock_digest_data),
711+};
712+
713+static const EVP_MD padlock_sha224_md = {
714+ NID_sha224,
715+ NID_sha224WithRSAEncryption,
716+ SHA224_DIGEST_LENGTH,
717+ 0,
718+ padlock_sha224_init,
719+ padlock_sha_update,
720+ padlock_sha_final,
721+ padlock_sha_copy,
722+ padlock_sha_cleanup,
723+ EVP_PKEY_RSA_method,
724+ SHA_CBLOCK,
725+ sizeof(struct padlock_digest_data),
726+};
727+
728+static const EVP_MD padlock_sha256_md = {
729+ NID_sha256,
730+ NID_sha256WithRSAEncryption,
731+ SHA256_DIGEST_LENGTH,
732+ 0,
733+ padlock_sha256_init,
734+ padlock_sha_update,
735+ padlock_sha_final,
736+ padlock_sha_copy,
737+ padlock_sha_cleanup,
738+ EVP_PKEY_RSA_method,
739+ SHA_CBLOCK,
740+ sizeof(struct padlock_digest_data),
741+};
742+
743+static int padlock_digest_nids[] = {
744+#if !defined(OPENSSL_NO_SHA)
745+ NID_sha1,
746+ NID_dsa,
747+#endif
748+#if !defined(OPENSSL_NO_SHA256)
749+#if !defined(OPENSSL_NO_SHA224)
750+ NID_sha224,
751+#endif
752+ NID_sha256,
753+#endif
754+};
755+
756+static int padlock_digest_nids_num = sizeof(padlock_digest_nids)/sizeof(padlock_digest_nids[0]);
757+
758+static int
759+padlock_digests (ENGINE *e, const EVP_MD **digest, const int **nids, int nid)
760+{
761+ /* No specific digest => return a list of supported nids ... */
762+ if (!digest) {
763+ *nids = padlock_digest_nids;
764+ return padlock_digest_nids_num;
765+ }
766+
767+ /* ... or the requested "digest" otherwise */
768+ switch (nid) {
769+#if !defined(OPENSSL_NO_SHA)
770+ case NID_sha1:
771+ *digest = &padlock_sha1_md;
772+ break;
773+ case NID_dsa:
774+ *digest = &padlock_dss1_md;
775+ break;
776+#endif
777+
778+#if !defined(OPENSSL_NO_SHA256)
779+#if !defined(OPENSSL_NO_SHA224)
780+ case NID_sha224:
781+ *digest = &padlock_sha224_md;
782+ break;
783+#endif /* OPENSSL_NO_SHA224 */
784+
785+ case NID_sha256:
786+ *digest = &padlock_sha256_md;
787+ break;
788+#endif /* OPENSSL_NO_SHA256 */
789+
790+ default:
791+ /* Sorry, we don't support this NID */
792+ *digest = NULL;
793+ return 0;
794+ }
795+
796+ return 1;
797+}
798+
799+#endif /* OPENSSL_NO_SHA */
800+
801+#ifndef PADLOCK_NO_RNG
802 /* ===== Random Number Generator ===== */
803 /*
804 * This code is not engaged. The reason is that it does not comply
805@@ -1164,7 +1729,7 @@
806 * (posted at http://www.via.com.tw/en/viac3/c3.jsp) nor does it
807 * provide meaningful error control...
808 */
809-/* Wrapper that provides an interface between the API and
810+/* Wrapper that provides an interface between the API and
811 the raw PadLock RNG */
812 static int
813 padlock_rand_bytes(unsigned char *output, int count)
814@@ -1212,6 +1777,7 @@
815 padlock_rand_bytes, /* pseudorand */
816 padlock_rand_status, /* rand status */
817 };
818+#endif /* PADLOCK_NO_RNG */
819
820 #endif /* COMPILE_HW_PADLOCK */
821
diff --git a/main/procps/01-fix-install-options-for-busybox.patch b/main/procps/01-fix-install-options-for-busybox.patch
new file mode 100644
index 0000000000..792a78155b
--- /dev/null
+++ b/main/procps/01-fix-install-options-for-busybox.patch
@@ -0,0 +1,65 @@
1--- orig/procps-3.2.8/Makefile
2+++ src/procps-3.2.8/Makefile
3@@ -27,7 +27,7 @@
4 ldconfig := ldconfig
5 ln_f := ln -f
6 ln_sf := ln -sf
7-install := install -D --owner 0 --group 0
8+install := install -D -o 0 -g 0
9
10 # Lame x86-64 /lib64 and /usr/lib64 abomination:
11 lib64 := lib$(shell [ -d /lib64 ] && echo 64)
12@@ -222,10 +222,10 @@
13 ###### install
14
15 $(BINFILES) : all
16- $(install) --mode a=rx $(notdir $@) $@
17+ $(install) -m a=rx $(notdir $@) $@
18
19 $(MANFILES) : all
20- $(install) --mode a=r $(notdir $@) $@
21+ $(install) -m a=r $(notdir $@) $@
22
23 install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
24 cd $(usr/bin) && $(ln_f) skill snice
25--- orig/procps-3.2.8/proc/module.mk
26+++ src/procps-3.2.8/proc/module.mk
27@@ -96,7 +96,7 @@
28 #################### install rules ###########################
29
30 $(lib)$(SOFILE) : proc/$(SONAME)
31- $(install) --mode a=rx $< $@
32+ $(install) -m a=rx $< $@
33
34 ifneq ($(SOLINK),$(SOFILE))
35 .PHONY: $(lib)$(SOLINK)
36@@ -115,14 +115,14 @@
37 $(ldconfig)
38
39 $(usr/lib)$(ANAME) : proc/$(ANAME)
40- $(install) --mode a=r $< $@
41+ $(install) -m a=r $< $@
42
43 # Junk anyway... supposed to go in /usr/include/$(NAME)
44 #INSTALL += $(addprefix $(include),$(HDRFILES))
45 #
46 #$(addprefix $(include),$(HDRFILES)): $(include)% : proc/%
47 #$(include)% : proc/%
48-# $(install) --mode a=r $< $@
49+# $(install) -m a=r $< $@
50
51 ##################################################################
52
53--- orig/procps-3.2.8/ps/module.mk
54+++ src/procps-3.2.8/ps/module.mk
55@@ -33,8 +33,8 @@
56
57
58 $(bin)ps: ps/ps
59- $(install) --mode a=rx $< $@
60+ $(install) -m a=rx $< $@
61
62 $(man1)ps.1 : ps/ps.1
63- $(install) --mode a=r $< $@
64+ $(install) -m a=r $< $@
65 -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
diff --git a/main/procps/APKBUILD b/main/procps/APKBUILD
index 4df2d72194..2a3accd622 100644
--- a/main/procps/APKBUILD
+++ b/main/procps/APKBUILD
@@ -9,7 +9,13 @@ depends=
9# needs fancy install 9# needs fancy install
10makedepends="ncurses-dev coreutils" 10makedepends="ncurses-dev coreutils"
11subpackages="$pkgname-dev $pkgname-doc libproc" 11subpackages="$pkgname-dev $pkgname-doc libproc"
12source="http://$pkgname.sourceforge.net/$pkgname-$pkgver.tar.gz" 12source="http://$pkgname.sourceforge.net/$pkgname-$pkgver.tar.gz
13 01-fix-install-options-for-busybox.patch"
14
15prepare() {
16 cd "$srcdir"
17 patch -p1 -i "$srcdir"/01-fix-install-options-for-busybox.patch || return 1
18}
13 19
14build() { 20build() {
15 cd "$srcdir"/$pkgname-$pkgver 21 cd "$srcdir"/$pkgname-$pkgver
@@ -31,4 +37,5 @@ libproc() {
31 ln -s libproc-$pkgver.so "$subpkgdir"/lib/libproc.so 37 ln -s libproc-$pkgver.so "$subpkgdir"/lib/libproc.so
32} 38}
33 39
34md5sums="9532714b6846013ca9898984ba4cd7e0 procps-3.2.8.tar.gz" 40md5sums="9532714b6846013ca9898984ba4cd7e0 procps-3.2.8.tar.gz
412b821e841acd08620789d5ffd19d58e9 01-fix-install-options-for-busybox.patch"
diff --git a/main/snort/APKBUILD b/main/snort/APKBUILD
index f9fc94b412..7c43bbcf02 100644
--- a/main/snort/APKBUILD
+++ b/main/snort/APKBUILD
@@ -1,8 +1,8 @@
1# Contributor: Michael Mason <ms13sp@gmail.com> 1# Contributor: Michael Mason <ms13sp@gmail.com>
2# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 2# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3pkgname=snort 3pkgname=snort
4pkgver=2.8.5.1 4pkgver=2.8.6
5pkgrel=1 5pkgrel=0
6pkgdesc="An open source network intrusion prevention and detection system" 6pkgdesc="An open source network intrusion prevention and detection system"
7url="http://www.snort.org/" 7url="http://www.snort.org/"
8license="GPL" 8license="GPL"
@@ -10,7 +10,7 @@ depends=
10makedepends="pcre-dev libpcap-dev libnet-dev autoconf automake libtool bison flex" 10makedepends="pcre-dev libpcap-dev libnet-dev autoconf automake libtool bison flex"
11install="$pkgname.pre-install" 11install="$pkgname.pre-install"
12subpackages="$pkgname-doc $pkgname-dev" 12subpackages="$pkgname-doc $pkgname-dev"
13source="http://dl.snort.org/snort-current/snort-$pkgver.tar.gz 13source="http://ansel.dnsalias.com/alpine/snort-$pkgver.tar.gz
14 snort.initd 14 snort.initd
15 snort.confd 15 snort.confd
16 " 16 "
@@ -22,7 +22,7 @@ build() {
22 sed -i -e 's/^all-local:.*/all-local: $(LTLIBRARIES)/' \ 22 sed -i -e 's/^all-local:.*/all-local: $(LTLIBRARIES)/' \
23 src/dynamic-preprocessors/*/Makefile.am || return 1 23 src/dynamic-preprocessors/*/Makefile.am || return 1
24 aclocal -I m4 && autoconf && automake --add-missing && libtoolize || return 1 24 aclocal -I m4 && autoconf && automake --add-missing && libtoolize || return 1
25 25
26 ./configure --prefix=/usr \ 26 ./configure --prefix=/usr \
27 --sysconfdir=/etc \ 27 --sysconfdir=/etc \
28 --mandir=/usr/share/man \ 28 --mandir=/usr/share/man \
@@ -40,6 +40,6 @@ package() {
40 install -D -m 644 ../snort.confd "$pkgdir"/etc/conf.d/snort 40 install -D -m 644 ../snort.confd "$pkgdir"/etc/conf.d/snort
41} 41}
42 42
43md5sums="b1abf3a9fa3486720c9a2b5eff920417 snort-2.8.5.1.tar.gz 43md5sums="b1c2d3ddb1c0a859a47c5a31d19e60ad snort-2.8.6.tar.gz
44ffda56f7c20f5cea1c37c971e0f1d6c9 snort.initd 44ffda56f7c20f5cea1c37c971e0f1d6c9 snort.initd
45446f8d2b3435b8a6be738da978670605 snort.confd" 45446f8d2b3435b8a6be738da978670605 snort.confd"
diff --git a/main/wpa_supplicant/APKBUILD b/main/wpa_supplicant/APKBUILD
index 62695bf711..bbe82e4661 100644
--- a/main/wpa_supplicant/APKBUILD
+++ b/main/wpa_supplicant/APKBUILD
@@ -1,7 +1,7 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=wpa_supplicant 2pkgname=wpa_supplicant
3pkgver=0.7.2 3pkgver=0.7.2
4pkgrel=1 4pkgrel=2
5pkgdesc="A utility providing key negotiation for WPA wireless networks" 5pkgdesc="A utility providing key negotiation for WPA wireless networks"
6url="http://hostap.epitest.fi/wpa_supplicant" 6url="http://hostap.epitest.fi/wpa_supplicant"
7license="GPL" 7license="GPL"
@@ -17,7 +17,7 @@ _builddir="$srcdir"/$pkgname-$pkgver/$pkgname
17prepare() { 17prepare() {
18 cd "$_builddir" 18 cd "$_builddir"
19 # Toolchain setup 19 # Toolchain setup
20 echo "CC = $CC" > .config 20 echo "CC = ${CC:-gcc}" > .config
21 21
22 # Basic setup 22 # Basic setup
23 echo "CONFIG_CTRL_IFACE=y" >> .config 23 echo "CONFIG_CTRL_IFACE=y" >> .config
@@ -88,7 +88,7 @@ prepare() {
88 echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config 88 echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config
89} 89}
90 90
91build() { 91build() {
92 cd "$_builddir" 92 cd "$_builddir"
93 make LIBDIR=/lib BINDIR=/sbin || return 1 93 make LIBDIR=/lib BINDIR=/sbin || return 1
94 # comment out the network={ } stansas in config 94 # comment out the network={ } stansas in config
diff --git a/main/xbitmap/APKBUILD b/main/xbitmaps/APKBUILD
index 535572923b..535572923b 100644
--- a/main/xbitmap/APKBUILD
+++ b/main/xbitmaps/APKBUILD
diff --git a/makeall.sh b/makeall.sh
new file mode 100755
index 0000000000..10966c3fdf
--- /dev/null
+++ b/makeall.sh
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3for p in 1 2 3
4do
5 echo "============>>> ERROR: Pass $p <<<============"
6 make main 2>&1 | tee makelog-pass-$p-main.txt | grep ">>> ERROR:"
7 make testing 2>&1 | tee makelog-pass-$p-testing.txt | grep ">>> ERROR:"
8done
diff --git a/rebuild-alpine.sh b/rebuild-alpine.sh
new file mode 100755
index 0000000000..20756bd9a5
--- /dev/null
+++ b/rebuild-alpine.sh
@@ -0,0 +1,85 @@
1rootdir=$(pwd -P)
2
3distclean () {
4 echo "Removing traces of previous builds from $rootdir"
5 local allpkgs=$(find $rootdir -maxdepth 3 -name APKBUILD -print | sed -e 's/\/APKBUILD//g' | sort)
6 for p in $allpkgs ; do
7 cd $p
8 pwd
9 abuild clean 2>&1
10 abuild cleanoldpkg 2>&1
11 abuild cleanpkg 2>&1
12 abuild cleancache 2>&1
13 done
14}
15
16build () {
17 local pkgs
18 local maintainer
19 local pkgno
20 local failed
21 pkgs=$($rootdir/aport.lua deplist $rootdir $1)
22 pktcnt=$(echo $pkgs | wc -w)
23 pkgno=0
24 failed=0
25 for p in $pkgs ; do
26 pkgno=$(expr "$pkgno" + 1)
27 echo "Building $p ($pkgno of $pktcnt in $1 - $failed failed)"
28 cd $rootdir/$1/$p
29 abuild -rm > $rootdir/$1_$p.txt 2>&1
30 if [ "$?" = "0" ] ; then
31 rm $rootdir/$1_$p.txt
32 else
33 echo "Package $1/$p failed to build (output in $rootdir/$1_$p.txt)"
34 if [ -n "$mail" ] ; then
35 maintainer=$(grep Maintainer APKBUILD | cut -d " " -f 3-)
36 if [ -n "$maintainer" ] ; then
37 recipients="$maintainer -c dev@lists.alpinelinux.org"
38 else
39 recipients="dev@lists.alpinelinux.org"
40 fi
41 if [ -n "$mail" ] ; then
42 echo "Package $1/$p failed to build. Build output is attached" | \
43 email -s "NOT SPAM $p build report" -a $rootdir/$1_$p.txt \
44 -n AlpineBuildBot -f buildbot@alpinelinux.org $recipients
45 fi
46 fi
47 failed=$(expr "$failed" + 1)
48 fi
49 done
50 cd $rootdir
51}
52
53touch START_OF_BUILD.txt
54
55unset clean
56unset mail
57while getopts "cm" opt; do
58 case $opt in
59 'c') clean="--clean";;
60 'm') mail="--mail";;
61 esac
62done
63
64if [ -n "$clean" ] ; then
65 echo "Invoked with 'clean' option. This will take a while ..."
66 tmp=$(distclean)
67 echo "Done"
68fi
69
70echo "Refresh aports tree"
71git pull
72
73#cd main/build-base
74#abuild -Ru
75#cd $rootdir
76
77for s in main testing unstable ; do
78 echo "Building packages in $s"
79 build $s
80done
81
82touch END_OF_BUILD.txt
83
84echo "Done"
85
diff --git a/testing/mutt/APKBUILD b/testing/mutt/APKBUILD
new file mode 100644
index 0000000000..e8cfa03fd1
--- /dev/null
+++ b/testing/mutt/APKBUILD
@@ -0,0 +1,50 @@
1# Contributor: Andrew Manison<amanison@anselsystems.com>
2# Maintainer: Andrew Manison<amanison@anselsystems.com>
3pkgname=mutt
4pkgver=1.4.2.3
5pkgrel=0
6pkgdesc="a small but very powerful text-mode email client"
7url="http://www.mutt.org"
8license="GPL"
9depends="openssl ncurses libiconv"
10makedepends="openssl-dev ncurses-dev"
11install=
12subpackages="$pkgname-doc"
13source="ftp://ftp.mutt.org/$pkgname/$pkgname-$pkgver.tar.gz"
14
15# append extra dependencies to -dev subpackage
16# remove if not used.
17# depends_dev="somepackage-dev"
18
19_builddir="$srcdir"/$pkgname-$pkgver
20
21prepare() {
22 cd "$_builddir"
23 # apply patches here
24}
25
26build() {
27 cd "$_builddir"
28 ./configure --prefix=/usr \
29 --sysconfdir=/etc \
30 --mandir=/usr/share/man \
31 --infodir=/usr/share/info \
32 --enable-imap \
33 --enable-pop \
34 --enable-smtp \
35 --with-curses \
36 --with-mailpath=/var/spool/mail \
37 --with-ssl
38 make || return 1
39}
40
41package() {
42 cd "$_builddir"
43 make DESTDIR="$pkgdir" install
44
45 # remove the 2 lines below (and this) if there is no init.d script
46 # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
47 # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
48}
49
50md5sums="dcb94661827dd090fa813e73e122ea0c mutt-1.4.2.3.tar.gz"