Merge pull request #1 from milisarge/master

Fork güncelleme
This commit is contained in:
Yaşar Çiv 2017-04-20 11:02:09 +03:00 committed by GitHub
commit 3627a16935
21 changed files with 702 additions and 16 deletions

View File

@ -21,6 +21,7 @@ qemu-all
worker worker
yad yad
cdrkit cdrkit
bindutils
scrot scrot
syslinux syslinux
networkmanager networkmanager

View File

@ -25,6 +25,7 @@ vlc
libreoffice libreoffice
sysv-rc-conf sysv-rc-conf
rfkill rfkill
bindutils
samba samba
dosfstools dosfstools
os-prober os-prober

View File

@ -0,0 +1,61 @@
http_port 3128 intercept
https_port 3130 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myca.pem key=/etc/squid/ssl_cert/ca-key.pem
visible_hostname milis
cache_mem 8 MB
cache_dir aufs /var/squid 900 16 256
http_port 3129
# For squid 3.5.x
#always_direct allow all
ssl_bump server-first all
#sslproxy_cert_error deny all
#sslproxy_flags DONT_VERIFY_PEER
sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
sslcrtd_children 8 startup=1 idle=1
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow localnet
http_access allow localhost
http_access deny all
coredump_dir /var/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

View File

@ -0,0 +1,12 @@
# bütün kurallar temizlenir
servis iptables clear
# değişkenler ayarlanır
SUID=$(id -u squid)
agarayuz=wlp3s0
# 80 ve 443 çıkışları squid e tahsis edilir.80 ve 443 çıkışları squid in ilgili portlarına yönlendirilir.
iptables -t nat -A OUTPUT -p tcp -m multiport --dports 80,443 -m owner --uid-owner 90 -j ACCEPT
iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner ! --uid-owner 90 -j REDIRECT --to-port 3128
iptables -t nat -A OUTPUT -p tcp --dport 443 -m owner ! --uid-owner 90 -j REDIRECT --to-port 3130
iptables -A OUTPUT -o $agarayuz -p tcp -m multiport --dports 1024:65535 -m state --state NEW -j ACCEPT

View File

@ -0,0 +1,52 @@
# kendinden imzalı sertifika ayarlama
cd /etc/squid
mkdir ssl_cert
chown squid:squid ssl_cert
chmod 700 ssl_cert
cd ssl_cert
# sertifika oluştumak için alternatif
#certtool --generate-privkey --outfile ca-key.pem
#certtool --generate-self-signed --load-privkey ca-key.pem --outfile myca.pem
# sertifikanın oluşturulması
openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -extensions v3_ca -keyout ca-key.pem -out myca.pem
# firefox a yüklenecek der dosyasının oluşturulması
openssl x509 -in myca.pem -outform DER -out myca.der
# squid sertifika veritabanı ayarlanması
/usr/lib/squid/ssl_crtd -c -s /var/lib/ssl_db
chown -R squid.squid /var/lib/ssl_db
# yeni squid ayarlarının kopyalanması.(eskisi varsa yedekleyin.)
cp -f /sources/milis.git/ayarlar/squid/transparent/squid.conf /etc/squid/
# iptables kurallarının yüklenmesi-Not: squid_iptables_yapilandir.sh içinde ağ arayüzünü kendi arayüzünüze ayarlayın.
./sources/milis.git/ayarlar/squid/transparent/squid_iptables_yapilandir.sh
# squid başlatılması
servis squid start

11
bin/hostlari_yenile Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# /etc altındaki hosts dosyasını yeniler ve istenmeyen reklam ve sitelerden korunulur.
cd /tmp
#wget http://sbc.io/hosts/hosts
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
mv /etc/hosts /tmp/hosts-eski
mv hosts /etc/hosts
# eğer home dizini altında .hosts dosyanız varsa onu /etc/hosts dosyasına ekler.
if [ -f ~/.hosts ]; then
cat ~/.hosts >> /etc/hosts
fi

View File

@ -1462,6 +1462,8 @@ ayarlar() {
shift ;; shift ;;
-trl) -trl)
tarihce_liste ;; tarihce_liste ;;
dos)
tarihce_yukle "temel" ;;
-trs) -trs)
if [ ! "$2" ]; then if [ ! "$2" ]; then
ryaz 31 "parametre eksik $1" ryaz 31 "parametre eksik $1"

2
bin/saat_ayarla_ntp Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
ntpdate -s tr.pool.ntp.org

View File

@ -29,16 +29,21 @@ import sys
import re import re
import os import os
import shlex import shlex
import urllib2
from requests.exceptions import HTTPError
# Milis linux talimat sınıfı # Milis linux talimat sınıfı
class Talimat(): class Talimat():
talimatname="/sources/milis.git/talimatname/"
def __init__(self): def __init__(self):
self.tanim="" self.tanim=""
self.url="" self.url=""
self.paketci="" self.paketci=""
self.gerekler=[] self.gerekler=[]
self.isim="" self.isim=""
self._isim=""
self.surum="" self.surum=""
self.devir="" self.devir=""
self.kaynaklar=[] self.kaynaklar=[]
@ -50,13 +55,17 @@ class Talimat():
self.tanim=pkgbuild.description self.tanim=pkgbuild.description
self.url=pkgbuild.url self.url=pkgbuild.url
self.paketci="milisarge" self.paketci="milisarge"
for mgerek in pkgbuild.makedepends: if hasattr(pkgbuild, 'makedepends'):
if mgerek not in self.gerekler: for mgerek in pkgbuild.makedepends:
self.gerekler.append(mgerek) if mgerek not in self.gerekler:
for gerek in pkgbuild.depends: self.gerekler.append(mgerek)
if gerek not in self.gerekler: if hasattr(pkgbuild, 'depends'):
self.gerekler.append(gerek) for gerek in pkgbuild.depends:
if gerek not in self.gerekler:
self.gerekler.append(gerek)
self.isim=pkgbuild.name self.isim=pkgbuild.name
if hasattr(pkgbuild, '_name'):
self._isim=pkgbuild._name
self.surum=pkgbuild.version self.surum=pkgbuild.version
self.devir=pkgbuild.release self.devir=pkgbuild.release
self.kaynaklar=pkgbuild.sources self.kaynaklar=pkgbuild.sources
@ -66,7 +75,10 @@ class Talimat():
def _gerekler(self): def _gerekler(self):
gerekstr="" gerekstr=""
for gerek in self.gerekler: for gerek in self.gerekler:
gerekstr+=gerek+" " if os.path.exists(self.talimatname+"temel-ek/"+gerek) is False and os.path.exists(self.talimatname+"temel/"+gerek) is False:
gerekstr+=gerek+" "
if os.path.exists(self.talimatname+"genel/"+gerek) is False:
print renk.uyari+gerek+" talimatı yapılmalı!"+renk.son
return gerekstr return gerekstr
def _kaynaklar(self): def _kaynaklar(self):
@ -84,13 +96,13 @@ class Talimat():
blok=False blok=False
onblok=False onblok=False
for satir in satirlar: for satir in satirlar:
if "md5sums=(" in satir: if "md5sums=(" in satir or "sha256sums=('" in satir:
onblok=True onblok=True
if onblok is True and "')" in satir: if onblok is True and "')" in satir:
blok=True blok=True
continue continue
if blok and satir.rstrip()!="" and satir.rstrip()!="}": if blok and satir.rstrip()!="" and satir.rstrip()!="}":
if (satir not in self.derleme) and ("pkgver()" not in satir) and ("prepare()" not in satir) and ("build()" not in satir) and ("package()" not in satir): if (satir not in self.derleme) and ("pkgver()" not in satir) and ("prepare()" not in satir) and ("build()" not in satir) and ("package()" not in satir) and ("check()" not in satir):
satir=satir.replace("pkgdir","PKG") satir=satir.replace("pkgdir","PKG")
satir=satir.replace("srcdir","SRC") satir=satir.replace("srcdir","SRC")
satir=satir.replace("pkgname","name") satir=satir.replace("pkgname","name")
@ -102,8 +114,8 @@ class Talimat():
def olustur(self): def olustur(self):
if self.isim: if self.isim:
print self.isim print renk.tamamb+self.isim+" talimatı hazırlanıyor..."+renk.son
os.system("mkdir "+self.isim) os.system("mkdir -p "+self.isim)
open(self.isim+"/talimat","w").write(self.icerik()) open(self.isim+"/talimat","w").write(self.icerik())
def icerik(self): def icerik(self):
@ -114,6 +126,8 @@ class Talimat():
icerikstr+="# Depends on: "+self._gerekler() icerikstr+="# Depends on: "+self._gerekler()
icerikstr+="\n"+"\n" icerikstr+="\n"+"\n"
icerikstr+="name="+self.isim+"\n" icerikstr+="name="+self.isim+"\n"
if self._isim !="":
icerikstr+="_name="+self._isim+"\n"
icerikstr+="version="+str(self.surum)+"\n" icerikstr+="version="+str(self.surum)+"\n"
icerikstr+="release="+str(self.devir)+"\n" icerikstr+="release="+str(self.devir)+"\n"
icerikstr+="source=("+self._kaynaklar()+")" icerikstr+="source=("+self._kaynaklar()+")"
@ -125,6 +139,7 @@ class Talimat():
def cevir(self,dosya,tip="arch"): def cevir(self,dosya,tip="arch"):
self.ice_aktar(dosya,tip) self.ice_aktar(dosya,tip)
self.olustur() self.olustur()
print renk.tamamy+talimat.isim+" talimatı hazır."+renk.son
# archlinux pkgbuild sınıfı # archlinux pkgbuild sınıfı
@ -149,6 +164,7 @@ class PKGBUILD():
# Symbol lookup table # Symbol lookup table
self._var_map = { self._var_map = {
'pkgname': 'name', 'pkgname': 'name',
'_pkgname': '_name',
'pkgver': 'version', 'pkgver': 'version',
'pkgdesc': 'description', 'pkgdesc': 'description',
'pkgrel': 'release', 'pkgrel': 'release',
@ -282,13 +298,61 @@ class renk:
kalin = '\033[1m' kalin = '\033[1m'
altcizgili = '\033[4m' altcizgili = '\033[4m'
class Arge:
def indir(self,link):
if "packages/" in link:
paket=link.split("?h=packages/")[1]
else:
paket=link.split("?h=")[1]
print renk.tamamb+paket+" indiriliyor..."+renk.son
try:
veri = urllib2.urlopen(link)
open(paket+"_pkgbuild","w").write(veri.read())
return paket+"_pkgbuild"
except urllib2.HTTPError, e:
if e.code == 404:
print renk.hata+link+" bulunamadı!"+renk.son
return None
def aur_link(self,paket):
link="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h="+paket
return link
def arch2_link(self,paket):
link="https://git.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/"+paket
return link
def arch_link(self,paket):
link="https://git.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/"+paket
return link
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) > 1: if len(sys.argv) > 1:
dosya=sys.argv[1] dosya=sys.argv[1]
talimat=Talimat()
arge=Arge()
if os.path.exists(dosya): if os.path.exists(dosya):
talimat=Talimat()
talimat.cevir(dosya) talimat.cevir(dosya)
print renk.tamamy+talimat.isim+" talimatı hazır."+renk.son elif "https" in dosya or "http" in dosya:
Pdosya=arge.indir(dosya)
talimat.cevir(Pdosya)
elif dosya == "-a":
if len(sys.argv) > 2:
paket=sys.argv[2]
paket=str(paket)
link=arge.aur_link(paket)
dosya=arge.indir(link)
if dosya is None:
link=arge.arch_link(paket)
dosya=arge.indir(link)
if dosya is None:
link=arge.arch2_link(paket)
dosya=arge.indir(link)
if link and dosya:
talimat.cevir(dosya)
else: else:
print renk.hata+dosya+" dosyası bulunamadı!"+renk.son print renk.hata+dosya+" paremetre bulunamadı!"+renk.son

View File

@ -0,0 +1,23 @@
# Description: Bind araçları
# URL: http://www.isc.org/software/bind
# Packager: milisarge
# Depends on:
name=bindutils
version=9.11.0
release=1
source=(ftp://ftp.isc.org/isc/bind9/$version/bind-$version.tar.gz)
build() {
cd bind-$version
./configure --prefix=/usr \
--disable-linux-caps \
--with-libxml2=no
make -C lib
make -C bin/dig
install -D -m 755 bin/dig/host $PKG/usr/bin/host
install -D -m 644 bin/dig/host.1 $PKG/usr/share/man/man1/host.1
install -D -m 755 bin/dig/dig $PKG/usr/bin/dig
install -D -m 644 bin/dig/dig.1 $PKG/usr/share/man/man1/dig.1
}

View File

@ -0,0 +1,21 @@
# Description: The iptables stateful packet filtering firewall builder.
# URL: http://firehol.sourceforge.net
# Packager: milisarge
# Depends on: iptables iproute2 iprange ipset
name=firehol
version=3.1.3
release=1.0
source=(https://github.com/firehol/firehol/releases/download/v3.1.3/firehol-3.1.3.tar.xz)
build() {
cd "$name-$version"
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--libexecdir=/usr/lib
make
make install DESTDIR="$PKG"
touch "$PKG"/etc/firehol/fire{hol,qos}.conf
}

View File

@ -0,0 +1,19 @@
# Description: ip aralıklarını yönetme aracı- firehol projesinden
# URL: http://firehol.org/
# Packager: milisarge
# Depends on: help2man
name=iprange
version=1.0.3
release=2.0
source=(https://github.com/firehol/$name/archive/v$version.tar.gz
)
build() {
cd "$name-$version"
./autogen.sh
./configure --disable-man --prefix="/usr" --sysconfdir="/etc" --sbindir="/usr/bin"
make
make prefix="$PKG/usr" sysconfdir="$PKG/etc" sbindir="$PKG/usr/bin" install
}

View File

@ -0,0 +1,19 @@
# Description: IP veya port ayarlamaları için yetkili uygulaması
# URL: http://ipset.netfilter.org/
# Packager: milisarge
# Depends on: iptables libmnl
name=ipset
version=6.32
release=1
source=(http://$name.netfilter.org/$name-$version.tar.bz2)
build() {
cd $name-$version
./configure --prefix=/usr --sbindir=/usr/bin --with-kmod=no
make
make DESTDIR="$PKG" install
install -Dm644 lib/libipset.pc "$PKG/usr/lib/pkgconfig/libipset.pc"
# default config file
install -Dm 644 /dev/null "$PKG/etc/$name.conf"
}

View File

@ -0,0 +1,18 @@
# Description: kernel paket filtresi tarafından günlüğe kaydedilen paketlere arabirim sağlayan bir kullanıcı alanı kütüphanesi.
# URL: http://netfilter.org/projects/libnetfilter_log/
# Packager: milisarge
# Depends on: libnfnetlink
name=libnetfilter_log
version=1.0.1
release=1
source=(http://www.netfilter.org/projects/$name/files/$name-$version.tar.bz2)
build() {
cd $name-$version
./configure \
--prefix=/usr \
--disable-static
make
make DESTDIR=$PKG install
}

View File

@ -0,0 +1,110 @@
From 7a1a07c0028a1c88cd7716a058697c552a563b24 Mon Sep 17 00:00:00 2001
From: Felix Janda <felix.janda@posteo.de>
Date: Sat, 16 May 2015 14:49:07 +0200
Subject: include: Sync with kernel headers
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/libnfnetlink/linux_nfnetlink.h | 44 ++++-----------------------
include/libnfnetlink/linux_nfnetlink_compat.h | 12 ++++----
2 files changed, 12 insertions(+), 44 deletions(-)
diff --git a/include/libnfnetlink/linux_nfnetlink.h b/include/libnfnetlink/linux_nfnetlink.h
index 76a8550..44a38d6 100644
--- a/include/libnfnetlink/linux_nfnetlink.h
+++ b/include/libnfnetlink/linux_nfnetlink.h
@@ -25,9 +25,9 @@ enum nfnetlink_groups {
/* General form of address family dependent message.
*/
struct nfgenmsg {
- u_int8_t nfgen_family; /* AF_xxx */
- u_int8_t version; /* nfnetlink version */
- u_int16_t res_id; /* resource id */
+ __u8 nfgen_family; /* AF_xxx */
+ __u8 version; /* nfnetlink version */
+ __be16 res_id; /* resource id */
};
#define NFNETLINK_V0 0
@@ -46,40 +46,8 @@ struct nfgenmsg {
#define NFNL_SUBSYS_CTNETLINK_EXP 2
#define NFNL_SUBSYS_QUEUE 3
#define NFNL_SUBSYS_ULOG 4
-#define NFNL_SUBSYS_COUNT 5
+#define NFNL_SUBSYS_OSF 5
+#define NFNL_SUBSYS_IPSET 6
+#define NFNL_SUBSYS_COUNT 7
-#ifdef __KERNEL__
-
-#include <linux/netlink.h>
-#include <linux/capability.h>
-#include <net/netlink.h>
-
-struct nfnl_callback
-{
- int (*call)(struct sock *nl, struct sk_buff *skb,
- struct nlmsghdr *nlh, struct nlattr *cda[]);
- const struct nla_policy *policy; /* netlink attribute policy */
- const u_int16_t attr_count; /* number of nlattr's */
-};
-
-struct nfnetlink_subsystem
-{
- const char *name;
- __u8 subsys_id; /* nfnetlink subsystem ID */
- __u8 cb_count; /* number of callbacks */
- const struct nfnl_callback *cb; /* callback for individual types */
-};
-
-extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
-extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
-
-extern int nfnetlink_has_listeners(unsigned int group);
-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
- int echo);
-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
-
-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
- MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
-
-#endif /* __KERNEL__ */
#endif /* _NFNETLINK_H */
diff --git a/include/libnfnetlink/linux_nfnetlink_compat.h b/include/libnfnetlink/linux_nfnetlink_compat.h
index e145176..74b9e55 100644
--- a/include/libnfnetlink/linux_nfnetlink_compat.h
+++ b/include/libnfnetlink/linux_nfnetlink_compat.h
@@ -1,6 +1,8 @@
#ifndef _NFNETLINK_COMPAT_H
#define _NFNETLINK_COMPAT_H
-#ifndef __KERNEL__
+
+#include <linux/types.h>
+
/* Old nfnetlink macros for userspace */
/* nfnetlink groups: Up to 32 maximum */
@@ -18,10 +20,9 @@
* ! nfnetlink use the same attributes methods. - J. Schulist.
*/
-struct nfattr
-{
- u_int16_t nfa_len;
- u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
+struct nfattr {
+ __u16 nfa_len;
+ __u16 nfa_type; /* we use 15 bits for the type, and the highest
* bit to indicate whether the payload is nested */
};
@@ -57,5 +58,4 @@ struct nfattr
+ NLMSG_ALIGN(sizeof(struct nfgenmsg))))
#define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
-#endif /* ! __KERNEL__ */
#endif /* _NFNETLINK_COMPAT_H */
--
cgit v0.12

View File

@ -0,0 +1,18 @@
# Description: Netfilter kernel/userspace iletişim kütüphnesi
# URL: http://www.netfilter.org/projects/libnfnetlink/index.html
# Packager: milisarge
# Depends on:
name=libnfnetlink
version=1.0.1
release=1
source=(http://www.netfilter.org/projects/$name/files/$name-$version.tar.bz2
sync_with_kernel_headers.patch)
build() {
cd $name-$version
patch -p1 -i $SRC/sync_with_kernel_headers.patch
./configure --prefix=/usr
make
make DESTDIR=$PKG install
}

View File

@ -0,0 +1,9 @@
/var/log/privoxy/logfile {
missingok
create 660 root privoxy
notifempty
compress
postrotate
/bin/kill -HUP `cat /var/run/privoxy.pid 2>/dev/null` 2> /dev/null || true
endscript
}

View File

@ -0,0 +1 @@
u privoxy 42 "Privoxy"

View File

@ -0,0 +1,62 @@
# Description: A web proxy with advanced filtering capabilities.
# URL: https://www.privoxy.org
# Packager: milisarge
# Depends on: pcre
name=privoxy
version=3.0.26
release=1
source=(https://downloads.sourceforge.net/ijbswa/privoxy-$version-stable-src.tar.gz
privoxy.logrotate.d
privoxy.sysusers)
build() {
cd "${SRC}/${name}-${version}-stable"
autoheader
autoconf
./configure --prefix=/usr --sysconfdir=/etc/privoxy --enable-compression
make
sed -i '
s+^confdir \.+confdir /etc/privoxy+
s+^logdir \.+logdir /var/log/privoxy+
s+^#\?user-manual .*+user-manual /usr/share/doc/privoxy/user-manual/+' config
cd "${SRC}/${name}-${version}-stable"
install -Dm644 "$SRC/privoxy.sysusers" "$PKG/usr/lib/sysusers.d/privoxy.conf"
install -Dm644 "$SRC/privoxy.logrotate.d" "$PKG/etc/logrotate.d/privoxy"
install -Dm755 {,"$PKG"/usr/bin/}privoxy
install -Dm644 {,"$PKG"/usr/share/man/man1/}privoxy.1
install -d -o42 -g42 "$PKG"/var/log/privoxy
install -d "$PKG"/etc/privoxy/
install -m644 config trust *.{action,filter} "$PKG"/etc/privoxy/ # -m0660 upstream
find templates -type f -exec install -Dm644 '{}' "$PKG"/etc/privoxy/'{}' \;
(d=$PKG/usr/share/doc/privoxy
cd doc/webserver
install -Dm644 {privoxy-,"$d"/}index.html
install -m644 p_doc.css ../../{AUTHORS,README,ChangeLog} "$d"/
install -Dm644 {,"$d"/user-manual/}p_doc.css
find user-manual developer-manual faq man-page \( -name '*.html' -o -name '*.jpg' \) -exec install -Dm644 '{}' "$d"/'{}' \;)
}

View File

@ -5,7 +5,7 @@
name=squid name=squid
version=3.5.24 version=3.5.24
release=1 release=2
source=(http://www.squid-cache.org/Versions/v3/3.5/$name-$version.tar.xz source=(http://www.squid-cache.org/Versions/v3/3.5/$name-$version.tar.xz
squid_servisi) squid_servisi)
@ -27,7 +27,9 @@ build () {
--with-large-files \ --with-large-files \
--with-pthreads \ --with-pthreads \
--with-aufs-threads=16 \ --with-aufs-threads=16 \
--disable-auto-locale --disable-auto-locale \
--with-openssl \
--enable-ssl-crtd
make all make all
make DESTDIR=$PKG install make DESTDIR=$PKG install

View File

@ -0,0 +1,178 @@
# Description: iptables ayarlamaları için güçlü bir arayüz uygulaması
# URL: http://www.vuurmuur.org
# Packager: milisarge
# Depends on: libnetfilter_log iptables libjpeg-turbo
name=vuurmuur
_name=Vuurmuur
version=0.8rc2
release=1
source=(ftp://ftp.vuurmuur.org/releases/$version/$_name-$version.tar.gz)
build() {
cd Vuurmuur-$version
chown -R root:root .
for file in libvuurmuur vuurmuur vuurmuur_conf ; do
tar xfvz $file-$version.tar.gz
done
chown -R root:root .
CFLAGS="$SLKCFLAGS" \
cd libvuurmuur-$version
./configure \
--prefix=/usr \
--sysconfdir=/etc
make
mkdir -p $PKG/usr/lib
( cd src/.libs/
for file in libvuurmuur.a libvuurmuur.so.0.6.0 ; do
cat $file > $PKG/usr/lib/$file
done
)
#replace "installed=no" "installed=yes" -- $PKG/usr/lib/libvuurmuur.la
mkdir -p $PKG/usr/include
( cd src
#strip --strip-unneeded vuurmuur.h
cat vuurmuur.h > $PKG/usr/include/vuurmuur.h
)
cd $PKG/usr/lib
ln -s libvuurmuur.so.0.6.0 libvuurmuur.so.0
ln -s libvuurmuur.so.0.6.0 libvuurmuur.so
cd $SRC/Vuurmuur-$version/vuurmuur-$version
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-libvuurmuur-includes=$PKG/usr/include \
--with-libvuurmuur-libraries=$PKG/usr/lib
make
mkdir -p $PKG/usr/bin
for file in vuurmuur vuurmuur_log vuurmuur_script ; do
( cd $file
strip --strip-unneeded $file
cat $file > $PKG/usr/bin/$file
chmod 755 $PKG/usr/bin/$file
)
done
mkdir -p $PKG/etc/rc.d/init.d
mkdir -p $PKG/etc/logrotate.d
( cd scripts
cat rc.vuurmuur > $PKG/etc/rc.d/init.d/vuurmuur
cat vuurmuur-logrotate > $PKG/etc/logrotate.d/vuurmuur
)
#replace "VUURMUUR_LOCATION=/usr/local/bin" "VUURMUUR_LOCATION=/usr/bin" -- $PKG/etc/rc.d/init.d/vuurmuur
chmod +x $PKG/etc/rc.d/init.d/vuurmuur
mkdir -p $PKG/usr/man/ru/man8
mkdir -p $PKG/usr/man/man8
( cd man/en
for file in vuurmuur.8 vuurmuur_log.8 vuurmuur_script.8 ; do
cat $file > $PKG/usr/man/man8/$file
done
)
( cd man/ru
for file in vuurmuur.8 vuurmuur_log.8 vuurmuur_script.8 ; do
cat $file > $PKG/usr/man/ru/man8/$file
done
)
mkdir -p $PKG/usr/share/vuurmuur/scripts
( cd scripts
cat vuurmuur-config-setup.sh > $PKG/usr/share/vuurmuur/scripts/vuurmuur-config-setup.sh
chmod 755 $PKG/usr/share/vuurmuur/scripts/vuurmuur-config-setup.sh
)
mkdir -p $PKG/usr/share/vuurmuur/config
mkdir -p -m 700 $PKG/etc/vuurmuur
( cd config
cat config.conf.sample > $PKG/usr/share/vuurmuur/config/config.conf.sample
cat config.conf.sample > $PKG/etc/vuurmuur/config.conf
chmod 600 $PKG/etc/vuurmuur/config.conf
)
mkdir -p $PKG/usr/share/vuurmuur/services
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/services
( cd services ;
LIST=" cvs imaps pop3 smtp upnp
dns irc msn pop3s socks usermin
ftp jabber mysql pptp squid-proxy vnc
http ldap news razor ssh webmin
https lisa ntp rdp syslog whois
ident pcanywhere rsync telnet windowsmedia
imap ping samba traceroute"
for file in $LIST ; do
cat $file > $PKG/usr/share/vuurmuur/services/$file
cat $file > $PKG/etc/vuurmuur/textdir/services/$file
chmod 600 $PKG/etc/vuurmuur/textdir/services/$file
done
)
cd $SRC/Vuurmuur-$version/vuurmuur_conf-$version
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-libvuurmuur-includes=$PKG/usr/include \
--with-libvuurmuur-libraries=$PKG/usr/lib
make
mkdir -p $PKG/usr/bin
( cd src
cat vuurmuur_conf > $PKG/usr/bin/vuurmuur_conf
chmod 755 $PKG/usr/bin/vuurmuur_conf
)
( cd po
for lang in de fr nb nl no ru en@boldquot pt_BR en@quot ; do
mkdir -p $PKG/usr/share/locale/$lang/LC_MESSAGES
cat $lang.gmo > $PKG/usr/share/locale/$lang/LC_MESSAGES/vuurmuur_conf.mo
done
)
mkdir -p $PKG/usr/share/vuurmuur/help
( cd help
for file in vuurmuur-fr.hlp vuurmuur-ru.UTF-8.hlp vuurmuur-ru.hlp vuurmuur.hlp ; do
cat $file > $PKG/usr/share/vuurmuur/help/$file
done
)
( cd man/en
for file in vuurmuur_conf.8 ; do
cat $file > $PKG/usr/man/man8/$file
done
)
( cd man/ru
for file in vuurmuur_conf.8 ; do
cat $file > $PKG/usr/man/ru/man8/$file
done
)
mkdir -p $PKG/usr/share/vuurmuur/scripts
( cd scripts
cat vuurmuur-searchlog.sh > $PKG/usr/share/vuurmuur/scripts/vuurmuur-searchlog.sh
chmod 755 $PKG/usr/share/vuurmuur/scripts/vuurmuur-searchlog.sh
)
mkdir -p $PKG/usr/share/vuurmuur/config
mkdir -p -m 700 $PKG/etc/vuurmuur
( cd config
cat vuurmuur_conf.conf.sample > $PKG/usr/share/vuurmuur/config/vuurmuur_conf.conf.sample
cat vuurmuur_conf.conf.sample > $PKG/etc/vuurmuur/vuurmuur_conf.conf
)
cd $SRC/Vuurmuur-$version/installer/zones
( for zone in dmz inet lan vpn ; do
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/zones/$zone/networks
cat $SRC/Vuurmuur-$version/installer/zones/$zone/zone.config > $PKG/etc/vuurmuur/textdir/zones/$zone/zone.config
done
)
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/zones/inet/networks/internet/groups
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/zones/inet/networks/internet/hosts
cat $SRC/Vuurmuur-$version/installer/zones/inet/networks/internet/network.config > $PKG/etc/vuurmuur/textdir/zones/inet/networks/internet/network.config
mkdir -p -m 700 $PKG/etc/vuurmuur/plugins
touch $PKG/etc/vuurmuur/plugins/textdir.conf
chmod 600 $PKG/etc/vuurmuur/plugins/textdir.conf
echo "LOCATION=\"/etc/vuurmuur/textdir\"" > $PKG/etc/vuurmuur/plugins/textdir.conf
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/zones
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/interfaces
mkdir -p -m 700 $PKG/etc/vuurmuur/textdir/rules
}