From f5b511421e2710b05a87a21b00f5055cad2108fd Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 12:18:15 +0200 Subject: [PATCH 01/20] bluez.guncellendi --- .../bluez-5.37-obexd_without_systemd-1.patch | 61 +++++++++++++++++++ talimatname/genel/bluez/talimat | 9 +-- 2 files changed, 66 insertions(+), 4 deletions(-) create mode 100755 talimatname/genel/bluez/bluez-5.37-obexd_without_systemd-1.patch diff --git a/talimatname/genel/bluez/bluez-5.37-obexd_without_systemd-1.patch b/talimatname/genel/bluez/bluez-5.37-obexd_without_systemd-1.patch new file mode 100755 index 000000000..749787c5b --- /dev/null +++ b/talimatname/genel/bluez/bluez-5.37-obexd_without_systemd-1.patch @@ -0,0 +1,61 @@ +Submitted By: Armin K. +Date: 2013-04-29 +Initial Package Version: 5.17 +Upstream Status: unknown +Origin: Arch Linux (Giovanni Campagna) +Description: Allow using obexd without systemd in the user session + +Not all sessions run systemd --user (actually, the majority +doesn't), so the dbus daemon must be able to spawn obexd +directly, and to do so it needs the full path of the daemon. +--- + Makefile.obexd | 4 ++-- + obexd/src/org.bluez.obex.service | 4 ---- + obexd/src/org.bluez.obex.service.in | 4 ++++ + 3 files changed, 6 insertions(+), 6 deletions(-) + delete mode 100644 obexd/src/org.bluez.obex.service + create mode 100644 obexd/src/org.bluez.obex.service.in + +diff --git a/Makefile.obexd b/Makefile.obexd +index 3760867..142e7c3 100644 +--- a/Makefile.obexd ++++ b/Makefile.obexd +@@ -2,12 +2,12 @@ + if SYSTEMD + systemduserunitdir = @SYSTEMD_USERUNITDIR@ + systemduserunit_DATA = obexd/src/obex.service ++endif + + dbussessionbusdir = @DBUS_SESSIONBUSDIR@ + dbussessionbus_DATA = obexd/src/org.bluez.obex.service +-endif + +-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service ++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in + + obex_plugindir = $(libdir)/obex/plugins + +diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service +deleted file mode 100644 +index a538088..0000000 +--- a/obexd/src/org.bluez.obex.service ++++ /dev/null +@@ -1,4 +0,0 @@ +-[D-BUS Service] +-Name=org.bluez.obex +-Exec=/bin/false +-SystemdService=dbus-org.bluez.obex.service +diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in +new file mode 100644 +index 0000000..9c815f2 +--- /dev/null ++++ b/obexd/src/org.bluez.obex.service.in +@@ -0,0 +1,4 @@ ++[D-BUS Service] ++Name=org.bluez.obex ++Exec=@libexecdir@/obexd ++SystemdService=dbus-org.bluez.obex.service +-- +1.8.3.1 + + diff --git a/talimatname/genel/bluez/talimat b/talimatname/genel/bluez/talimat index eb80ecf87..73b5f66f5 100644 --- a/talimatname/genel/bluez/talimat +++ b/talimatname/genel/bluez/talimat @@ -5,13 +5,14 @@ name=bluez version=5.37 -release=1 +release=2 source=(http://www.kernel.org/pub/linux/bluetooth/$name-$version.tar.xz - http://www.linuxfromscratch.org/patches/blfs/svn/$name-$version-obexd_without_systemd-1.patch) + $name-$version-obexd_without_systemd-1.patch) build() { + source /etc/blfs-bootscripts -wget http://www.linuxfromscratch.org/blfs/downloads/svn/blfs-bootscripts-$scriptsversion.tar.bz2 +wget http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-$scriptsversion.tar.bz2 tar xvf $scripts-$scriptsversion.tar.bz2 cd $name-$version @@ -41,7 +42,7 @@ make DESTDIR=$PKG install install -v -dm755 $PKG/{etc/bluetooth,usr/sbin} -ln -svf ../libexec/bluetooth/bluetoothd $PKG/usr/sbin +ln -svf /lib/bluetooth/bluetoothd $PKG/usr/sbin/ cat > $PKG/etc/bluetooth/rfcomm.conf << "EOF" From 87072b415513afa6640708e6ea05d2ce24427233 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 12:36:58 +0200 Subject: [PATCH 02/20] emacs.guncellendi --- talimatname/genel/emacs/site-start.el | 2 +- talimatname/genel/emacs/talimat | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/talimatname/genel/emacs/site-start.el b/talimatname/genel/emacs/site-start.el index 220b81028..90416a5c2 100644 --- a/talimatname/genel/emacs/site-start.el +++ b/talimatname/genel/emacs/site-start.el @@ -1,4 +1,4 @@ (set-language-environment "latin-1") -(set-locale-environment "fr_FR") +(set-locale-environment "tr_TR") (set-foreground-color "GreenYellow") (set-background-color "black") diff --git a/talimatname/genel/emacs/talimat b/talimatname/genel/emacs/talimat index db3e5b451..eba238763 100644 --- a/talimatname/genel/emacs/talimat +++ b/talimatname/genel/emacs/talimat @@ -1,7 +1,8 @@ +# Description: özellikle genişletilebilir,ilişkili gerçek zamanlı metin editörü # URL: https://www.gnu.org/software/emacs/ -# Packager: berlius at nutyx dot com +# Packager: milisarge # Depends on: gtk2 desktop-file-utils libjpeg-turbo giflib -description="An extensible, customizable, self-documenting real-time display editor." + name=emacs version=24.5 release=1 From 7e3e43735f1632bbfa5017e2b0c349a7e5e24a3d Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 15:26:05 +0200 Subject: [PATCH 03/20] milis-kurulum.guncellendi --- bin/milis-kurulum.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/milis-kurulum.py b/bin/milis-kurulum.py index 600fc9dab..a4b220fe3 100644 --- a/bin/milis-kurulum.py +++ b/bin/milis-kurulum.py @@ -12,9 +12,15 @@ os.system("mps -GG") if os.path.exists("/usr/bin/pip3") is False: os.system("mps -G") time.sleep(3) - os.system("mps kur python3-pip && pip3 install pythondialog") + os.system("mps kur python3-pip") + else: - os.system("pip3 install pythondialog") + if 'pythondialog' in sys.modules: + print ("pythongialog yuklu") + else: + time.sleep(3) + os.system("pip3 install pythondialog") + if os.path.exists("/usr/bin/acp") is False: os.system("mps -G") time.sleep(3) From ec1357bc1da392f1d96001a075eb37c1eb25bb50 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 19:44:41 +0200 Subject: [PATCH 04/20] midori-talimat.guncelleme --- talimatname/genel/midori/talimat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/talimatname/genel/midori/talimat b/talimatname/genel/midori/talimat index b00699f5a..bcc9fb100 100644 --- a/talimatname/genel/midori/talimat +++ b/talimatname/genel/midori/talimat @@ -1,7 +1,7 @@ -# Description: Midori is a lightweight web browser that uses WebKitGTK+. +# Description: WebKitGTK+ kullanan hafif tarayıcı # URL: http://www.twotoasts.de -# Packager: pierre at nutyx dot org, tnut at nutyx dot org -# Depends on: cmake gcr gtk3 webkitgtk3 vala libnotify librsvg libunique1 desktop-file-utils libzeitgeist hicolor-icon-theme gstreamer1-plugins-libav gstreamer1-plugins-base gstreamer1-plugins-good +# Packager: milisarge +# Depends on: cmake gcr gtk3 webkitgtk2 webkitgtk3 vala libnotify librsvg libunique1 desktop-file-utils libzeitgeist hicolor-icon-theme gstreamer1-plugins-libav gstreamer1-plugins-base gstreamer1-plugins-good run=(desktop-file-utils gtk-update-icon-cache hicolor-icon-theme) From 7b82df4d8263837b856a25327465f6b0a5e054f6 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 20:00:58 +0200 Subject: [PATCH 05/20] midori-talimat.guncelleme --- talimatname/genel/midori/talimat | 2 -- 1 file changed, 2 deletions(-) diff --git a/talimatname/genel/midori/talimat b/talimatname/genel/midori/talimat index bcc9fb100..dddd9a36e 100644 --- a/talimatname/genel/midori/talimat +++ b/talimatname/genel/midori/talimat @@ -3,8 +3,6 @@ # Packager: milisarge # Depends on: cmake gcr gtk3 webkitgtk2 webkitgtk3 vala libnotify librsvg libunique1 desktop-file-utils libzeitgeist hicolor-icon-theme gstreamer1-plugins-libav gstreamer1-plugins-base gstreamer1-plugins-good -run=(desktop-file-utils gtk-update-icon-cache hicolor-icon-theme) - name=midori version=0.5.11 release=1 From 1a1235e095bbf34033166b2d102080630154f701 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 20:47:24 +0200 Subject: [PATCH 06/20] mps.guncelleme --- bin/mps | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/bin/mps b/bin/mps index 441c426ff..6c339fd12 100755 --- a/bin/mps +++ b/bin/mps @@ -4,7 +4,7 @@ if [ -f /etc/mps.conf ];then . /etc/mps.conf fi . /root/bin/fonks.sh -versiyon="0.8.6" +versiyon="0.8.7" iletisim="milisarge@gmail.com" paketdepo="/depo/paketler/" if [ -z ${sunucu+:} ]; then @@ -128,7 +128,6 @@ paket_sil(){ rm -f /tmp/$paket.sil else rm -f /tmp/$paket.sil - exit 1 fi else @@ -337,6 +336,14 @@ paket_sil_oto(){ done } +paket_sil_oto_onayli(){ + local spkt + cat $1 + for spkt in `cat $1`;do + paket_sil "$spkt" + done +} + paket_guncelle(){ surum_kontrol $1 devir_kontrol $1 @@ -492,6 +499,24 @@ bagimli_bilgi(){ } +bagimli_bilgi_dosyala(){ + rm -f "$1.gerekler.liste" + local bagimd konum bag + konum="`find "$talimatname_dizin" -name $1`" + bagimd=`cat $konum/talimat | grep "Depends" | cut -d':' -f2` + if [ -n "$bagimd" ]; then + bagimd=`echo "$bagimd" | sed 's/,/ /g'` + #sıralı gösterme + #echo `echo "$bagimd" | sed 's/,/ /g'` + #kurulu kontrollu gosterim + for bag in $bagimd;do + echo $bag >> "$1.gerekler.liste" + done + fi + echo "$1" >> "$1.gerekler.liste" + +} + ters_bagimli(){ local ara ara=" $1 " @@ -960,6 +985,9 @@ ayarlar() { paket_sil "$2" ;; -sz|zorsil) paket_sil "$2" "evet";; + -S|silgrub) + mps -bbd "$2" + paket_sil_oto_onayli "$2.gerekler.liste" ;; -pa|ara) paket_ara "$2" ;; bul) @@ -1106,6 +1134,8 @@ ayarlar() { ryaz 32 $sunucu ;; -bb|--pkbb) bagimli_bilgi "$2" | column -t;; + -bbd) + bagimli_bilgi_dosyala "$2" ;; -tb|--pktb) ters_bagimli "$2" ;; -tbk|--pktbk) From c310c0dd188f92545bfa2e3aa8858c8c07ec6c2c Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 29 Jan 2017 21:18:36 +0200 Subject: [PATCH 07/20] shasum_deger_al --- bin/shasum_deger_al | 1 + 1 file changed, 1 insertion(+) create mode 100755 bin/shasum_deger_al diff --git a/bin/shasum_deger_al b/bin/shasum_deger_al new file mode 100755 index 000000000..54b9efc46 --- /dev/null +++ b/bin/shasum_deger_al @@ -0,0 +1 @@ +echo -n "$1" | sha1sum | awk '{print $1}' From 602043b0e1c829b77f5d5811bddf7beb1ed73764 Mon Sep 17 00:00:00 2001 From: milisman Date: Mon, 30 Jan 2017 21:56:27 +0200 Subject: [PATCH 08/20] simple-mtpfs.paketlendi --- talimatname/genel/simple-mtpfs/talimat | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 talimatname/genel/simple-mtpfs/talimat diff --git a/talimatname/genel/simple-mtpfs/talimat b/talimatname/genel/simple-mtpfs/talimat new file mode 100644 index 000000000..291e73699 --- /dev/null +++ b/talimatname/genel/simple-mtpfs/talimat @@ -0,0 +1,22 @@ +# Description: MTP cihazları için yazma/okuma yapabilen fuse dosya sistemi +# URL: https://github.com/phatina/simple-mtpfs/ +# Packager: milisarge +# Depends on: libmtp fuse + +name=simple-mtpfs +version=0.3.0 +release=1 + +source=(https://github.com/phatina/simple-mtpfs/archive/$name-$version.tar.gz) + +build(){ + cd $name-$name-$version + if [[ ! -e "./configure" ]]; then + ./autogen.sh + ./configure --prefix=/usr + else + ./config.status + fi + make + make DESTDIR=$PKG install +} From 4de9a5d7425239a33226ad87e194095972e2c141 Mon Sep 17 00:00:00 2001 From: milisman Date: Sat, 4 Feb 2017 19:14:33 +0200 Subject: [PATCH 09/20] xreader.paketlendi --- talimatname/genel/xreader/talimat | 19 +++++++++++++++++++ talimatname/genel/xreader/xreader.kur-kos | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 talimatname/genel/xreader/talimat create mode 100644 talimatname/genel/xreader/xreader.kur-kos diff --git a/talimatname/genel/xreader/talimat b/talimatname/genel/xreader/talimat new file mode 100644 index 000000000..450dacd5d --- /dev/null +++ b/talimatname/genel/xreader/talimat @@ -0,0 +1,19 @@ +# Description: PDF ve Postscript gibi dosyalar için belge görüntüleyici. X-Apps Projesi. +# URL: https://github.com/linuxmint/xreader +# Packager: milisarge yasarciv +# Depends on: ghostscript poppler-glib djvulibre desktop-file-utils gsettings-desktop-schemas gtk3 gtk2 libsecret mate-common yelp-tools + +name=xreader +version=1.2.2 +release=1 +source=(https://github.com/linuxmint/$name/archive/$version.tar.gz) + +build() { + cd $name-$version + ./autogen.sh --prefix="/usr" \ + --localstatedir="/var" \ + --libexecdir="/usr/lib/$name" \ + --disable-caja --disable-nemo + make +make DESTDIR=$PKG install +} diff --git a/talimatname/genel/xreader/xreader.kur-kos b/talimatname/genel/xreader/xreader.kur-kos new file mode 100644 index 000000000..a96c64f40 --- /dev/null +++ b/talimatname/genel/xreader/xreader.kur-kos @@ -0,0 +1,3 @@ +glib-compile-schemas /usr/share/glib-2.0/schemas/ +gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor +update-desktop-database -q From b0df4b979d02fe298f0b9777e0ee8f75fcf99024 Mon Sep 17 00:00:00 2001 From: milisman Date: Sat, 4 Feb 2017 20:52:45 +0200 Subject: [PATCH 10/20] gnome-keyring.paketlendi --- talimatname/genel/gnome-keyring/talimat | 27 +++++++++++++++++++ .../genel/network-manager-applet/talimat | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 talimatname/genel/gnome-keyring/talimat diff --git a/talimatname/genel/gnome-keyring/talimat b/talimatname/genel/gnome-keyring/talimat new file mode 100644 index 000000000..1b1c362f3 --- /dev/null +++ b/talimatname/genel/gnome-keyring/talimat @@ -0,0 +1,27 @@ +# Description: Gnome keyring functions +# URL: http://www.gnome.org/ +# Packager: milisarge +# Depends on: libgcrypt libtasn1 gcr + +name=gnome-keyring +version=3.20 +release=1 +source=(http://ftp.acc.umu.se/pub/GNOME/sources/$name/$version/$name-$version.0.tar.xz) + +build(){ + cd $name-$version.0 + + sed -i -e "s/USE_NLS=yes/USE_NLS=no/" \ + -e "s/ENABLE_NLS 1/ENABLE_NLS 0/" configure + export CFLAGS="$CFLAGS -D_GNU_SOURCE" + ./configure --prefix=/usr \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --disable-gtk-doc \ + --disable-nls + make + make DESTDIR=$PKG install + + rm -rf $PKG/usr/share/gtk-doc + +} diff --git a/talimatname/genel/network-manager-applet/talimat b/talimatname/genel/network-manager-applet/talimat index 663534aa1..3f0aca5e4 100644 --- a/talimatname/genel/network-manager-applet/talimat +++ b/talimatname/genel/network-manager-applet/talimat @@ -1,7 +1,7 @@ # Description: Tools which simplify and make the network more directly manageable. # URL: http://projects.gnome.org/NetworkManager/ -# Packager: pierre at nutyx dot org -# Depends on: gtk3 gconf iso-codes gobject-introspection libgnome-keyring libsecret libnotify networkmanager polkit-gnome modemmanager gtk-update-icon-cache +# Packager: milisarge +# Depends on: gtk3 gconf iso-codes gobject-introspection libgnome-keyring gnome-keyring ibsecret libnotify networkmanager polkit-gnome modemmanager gtk-update-icon-cache name=network-manager-applet version=1.4.2 From 4ac1740eb47f7b12cbec03322b82bf527c532ed5 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 5 Feb 2017 19:46:54 +0200 Subject: [PATCH 11/20] mtr.paketlendi --- talimatname/genel/mtr/talimat | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 talimatname/genel/mtr/talimat diff --git a/talimatname/genel/mtr/talimat b/talimatname/genel/mtr/talimat new file mode 100644 index 000000000..4d79473b2 --- /dev/null +++ b/talimatname/genel/mtr/talimat @@ -0,0 +1,22 @@ +# Description: Matt's traceroute - ağ test aracı +# URL: http://www.bitwizard.nl/mtr/ +# Packager: milisarge +# Depends on: + +name=mtr +version=0.87 +release=1 +source=(ftp://ftp.bitwizard.nl/mtr/$name-$version.tar.gz) + +build() { + cd $name-$version + + ./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --sbindir=/usr/bin \ + --without-gtk + + make + make DESTDIR=$PKG install +} From 8a11146c7f25b8a2c62c770cfbf3654550d4c744 Mon Sep 17 00:00:00 2001 From: milisman Date: Sun, 5 Feb 2017 21:05:42 +0200 Subject: [PATCH 12/20] yps_baslat6.sh --- bin/yps_baslat6.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/yps_baslat6.py diff --git a/bin/yps_baslat6.py b/bin/yps_baslat6.py new file mode 100755 index 000000000..0f65c828a --- /dev/null +++ b/bin/yps_baslat6.py @@ -0,0 +1,24 @@ +#!/usr/bin/python3 +import socket +from http.server import HTTPServer, SimpleHTTPRequestHandler + +class MyHandler(SimpleHTTPRequestHandler): + def do_GET(self): + if self.path == '/ip': + self.send_response(200) + self.send_header('Content-type', 'text/html') + self.end_headers() + self.wfile.write('ip adresiniz %s' % self.client_address[0]) + return + else: + return SimpleHTTPRequestHandler.do_GET(self) + +class HTTPServerV6(HTTPServer): + address_family = socket.AF_INET6 + +def main(): + server = HTTPServerV6(('::', 8000), MyHandler) + server.serve_forever() + +if __name__ == '__main__': + main() From 635edccd26de326433dc09666e87b8a008d8c2ff Mon Sep 17 00:00:00 2001 From: milisbir Date: Mon, 6 Feb 2017 08:31:51 +0000 Subject: [PATCH 13/20] tcpdump.paketlendi --- talimatname/genel/tcpdump/talimat | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 talimatname/genel/tcpdump/talimat diff --git a/talimatname/genel/tcpdump/talimat b/talimatname/genel/tcpdump/talimat new file mode 100644 index 000000000..8c3652ff8 --- /dev/null +++ b/talimatname/genel/tcpdump/talimat @@ -0,0 +1,17 @@ +# Description: Network sniffer with command line interface +# URL: http://www.tcpdump.org +# Packager : milisarge +# Depends on: libpcap + +name=tcpdump +version=4.9.0 +release=1 +source=(http://www.tcpdump.org/release/$name-$version.tar.gz) + +build() { + cd $name-$version + ./configure --prefix=/usr --enable-ipv6 + make + make DESTDIR=$PKG install + rm $PKG/usr/sbin/tcpdump.$version +} From aeb86d18d72212251ff0714ce511ba2a9d513b2b Mon Sep 17 00:00:00 2001 From: milisman Date: Tue, 7 Feb 2017 17:39:08 +0200 Subject: [PATCH 14/20] ncrypt --- bin/ncrypt | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100755 bin/ncrypt diff --git a/bin/ncrypt b/bin/ncrypt new file mode 100755 index 000000000..430753196 --- /dev/null +++ b/bin/ncrypt @@ -0,0 +1,224 @@ +#!/usr/bin/ruby + +require 'openssl' +require 'base64' +require 'securerandom' + +require 'net/http' +require 'net/https' + +def pbkdf2(password, salt, keylen, opts = {}) + hash = opts[:hash] || 'sha1' + iterations = (opts[:iterations] || 1) - 1 + def bigendian(val, len) + len.times.map { val, r = val.divmod 256; r }.reverse.pack('C*') + end + key = '' + blockindex = 1 + while key.length < keylen + block = OpenSSL::HMAC.digest(hash, password, salt + bigendian(blockindex, 4)) + u = block + iterations.times do + u = OpenSSL::HMAC.digest(hash, password, u) + block.length.times.each do |j| + block[j] ^= u[j] + end + end + key += block + blockindex += 1 + end + key.slice(0, keylen) +end + +def aes_decrypt(text, key, opts = {}) + text = text.dup + iv = text.slice!(0, 16) # aes has fixed blocksize of 128 bits + key = pbkdf2(key, iv, (opts[:aeskeysize] || 256) / 8, opts) + + cipher = OpenSSL::Cipher::AES.new(8 * key.length, opts[:mode] || :OFB).decrypt + cipher.key = key + cipher.iv = iv + cipher.update(text) + cipher.final +end + +def aes_encrypt(text, opts = {}) + key = opts[:key] || generateKey(opts[:keylen] || 24) + cipher = OpenSSL::Cipher::AES.new(opts[:aeskeysize] || 256, opts[:mode] || :OFB).encrypt + cipher.iv = iv = opts[:iv] || cipher.random_iv + cipher.key = pbkdf2(key, iv, (opts[:aeskeysize] || 256) / 8, opts) + text = cipher.update(text) + cipher.final + [ iv + text, key ] +end + +def generateKey(len = 24) + chars = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + len.times.map { chars[SecureRandom.random_number(chars.length)].ord }.pack('c*') +end + +def decrypt(text, key, opts = {}) + text = Base64.decode64(text) + aes_decrypt(text, key, opts) +end + +def encrypt(text, opts = {}) + text, key = aes_encrypt(text, opts) + [ Base64.encode64(text).gsub(/\s+/, ""), key ] +end + +def fixipv6host(host) + if m = /^\[([0-9a-fA-F:]+)\]$/.match(host) + return m[1] + end + host +end + +def http_get(uri) + request = Net::HTTP::Get.new uri.request_uri + request['Host'] = uri.host + http = Net::HTTP.new(fixipv6host(uri.host), uri.port) + http.use_ssl = uri.scheme == 'https' +# http.verify_mode = OpenSSL::SSL::VERIFY_PEER +# http.verify_depth = 5 + http.verify_mode = OpenSSL::SSL::VERIFY_NONE + http.start { |http| http.request request } +end + +def http_post(uri, args) + request = Net::HTTP::Post.new(uri.request_uri) + request['Host'] = uri.host + request.set_form_data(args) + http = Net::HTTP.new(fixipv6host(uri.host), uri.port) + http.use_ssl = uri.scheme == 'https' +# http.verify_mode = OpenSSL::SSL::VERIFY_PEER +# http.verify_depth = 5 + http.verify_mode = OpenSSL::SSL::VERIFY_NONE + http.start { |http| http.request request } +end + +def hashpw(password) + return nil if password.nil? + return OpenSSL::Digest::SHA1.hexdigest(password) +end + +require 'optparse' +opts = {} +OptionParser.new do |o| + o.on('-u', '--url URL', "Retrieve paste from url (conflicts with the posting options)") { |url| opts[:url] = URI(url) } + o.on('-f', '--file FILENAME', "Upload file") { |fn| opts[:fn] = fn } + o.on('-m', '--mime MIMETYPE', "Specify mime type for paste") { |mime| opts[:mime] = mime } + o.on('-t', '--ttl TTL', "Specify Time-To-Live for paste in seconds, default one week (-1 for indefinately, -100 for one time only)") { |ttl| opts[:ttl] = ttl } + o.on('-p', '--password[PASSWORD]', "Use password protection on server side (no additional encryption)") { |password| + opts[:pass] = true + opts[:password] = password unless password.nil? + } + o.on('-s', '--site SITE', "Post upload to another ncrypt pastebin (default: https://ncry.pt)") { |s| opts[:site] = s } + o.separator "" + o.separator " If neither url nor filename was given, a final parameter can be used to specify it. Urls are autodetected." + o.separator "" + o.on('-h', '--help', "Show this help") { STDERR.puts o; exit } + o.parse! + if ARGV.length == 1 + if opts[:url] || opts[:fn] + STDERR.puts o + exit 1 + end + begin + url = URI(ARGV[0]) + if ("http" == url.scheme || "https" == url.scheme) && url.host + opts[:url] = url + else + opts[:fn] = ARGV[0] + end + rescue + opts[:fn] = ARGV[0] + end + end + if ARGV.length > 1 or (opts[:url] and (opts[:fn] || opts[:ttl] || opts[:mime] || opts[:site] || opts[:pass])) or (!opts[:url] and !opts[:fn]) + STDERR.puts o + exit 1 + end +end + +if opts[:pass] and opts[:password].nil? + if opts[:fn] == '-' + STDERR.puts "Can't read post data from stdin and prompt for password" + exit 1 + end + STDERR.write "Enter password: " + STDERR.flush + opts[:password] = STDIN.readline.chomp +end + +if opts[:url] + uri = opts[:url] + if !uri.fragment + STDERR.puts "Specified url has no fragment, cannot decode paste" + exit 1 + end + + password = nil + while + if password.nil? + resp = http_get(uri) + else + resp = http_post(uri, :p => hashpw(password)) + end + + if 200 != resp.code.to_i + STDERR.puts "Got HTTP/#{resp.http_version} #{resp.code} #{resp.message}" + STDERR.puts "Location: #{resp['Location']}" if resp['Location'] + exit 1 + end + html = resp.body + + if m = (// and password.nil? + STDERR.write "Paste is password protected. Enter password: " + STDERR.flush + password = STDIN.readline.chomp + else + STDERR.puts "Can't parse response." + exit 1 + end + end + +else + uri = URI(opts[:site] || 'https://ncry.pt') + if opts[:fn] != '-' + if opts[:mime].nil? + begin + opts[:mime] = IO.popen("file --brief --mime-type '#{opts[:fn]}'", "r").read.chomp + rescue + # use default mime type text/plain + end + end + text = File.open(opts[:fn], "rb").read + else + text = STDIN.read + end + + cipher, key = encrypt(text) + resp = http_post(uri, :data => cipher, :syn => opts[:mime] || 'text/plain', :ttl => opts[:ttl] || (7*86400), :p => hashpw(opts[:password])) + if 200 != resp.code.to_i + STDERR.puts "Key is #{key}" + STDERR.puts "Got HTTP/#{resp.http_version} #{resp.code} #{resp.message}" + resp.each_header { |k,v| STDERR.puts "#{k}: #{v}" } + STDERR.puts resp.body + exit 1 + end + html = resp.body + if html =~ /^\{"id":".*"\}\s*$/m then + id = html.gsub(/^\{"id":"/m, "").gsub(/"\}\s*$/m, "") + uri.path += '/' unless ?/ == uri.path[-1] + uri.path += id + uri.fragment = key + puts uri + else + STDERR.puts "Key is #{key}" + STDERR.puts "Can't parse response #{resp.body}" + exit 1 + end +end From 4a6d8f611a9ec915615dbca2fcc3cc817fdd205f Mon Sep 17 00:00:00 2001 From: milisman Date: Wed, 8 Feb 2017 13:21:28 +0200 Subject: [PATCH 15/20] mate.xinitrc --- ayarlar/.xinitrc.mate | 1 + 1 file changed, 1 insertion(+) create mode 100644 ayarlar/.xinitrc.mate diff --git a/ayarlar/.xinitrc.mate b/ayarlar/.xinitrc.mate new file mode 100644 index 000000000..94c6420fe --- /dev/null +++ b/ayarlar/.xinitrc.mate @@ -0,0 +1 @@ +exec mate-session From b5432e24488f3ba819aabb37d288c71a4ca9a757 Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 8 Feb 2017 12:08:55 +0000 Subject: [PATCH 16/20] mate-ayarlari --- ayarlar/mate/.config/caja/accels | 173 ++ ayarlar/mate/.config/caja/desktop-metadata | 23 + ayarlar/mate/.config/dconf/user | Bin 0 -> 5604 bytes .../.config/geany/filedefs/filetypes.README | 2 + ayarlar/mate/.config/geany/geany.conf | 221 +++ ayarlar/mate/.config/geany/keybindings.conf | 0 .../.config/geany/templates/templates.README | 2 + ayarlar/mate/.config/mimeapps.list | 5 + ayarlar/mate/.config/user-dirs.dirs | 15 + ayarlar/mate/.config/user-dirs.locale | 1 + mps-0.8/fonks.sh | 244 +++ mps-0.8/mps | 1301 ++++++++++++++ mps-0.8/mpsd | 1540 +++++++++++++++++ mps-0.8/mpsd.conf | 31 + mps-0.8/onmpsd.conf | 32 + 15 files changed, 3590 insertions(+) create mode 100644 ayarlar/mate/.config/caja/accels create mode 100644 ayarlar/mate/.config/caja/desktop-metadata create mode 100644 ayarlar/mate/.config/dconf/user create mode 100644 ayarlar/mate/.config/geany/filedefs/filetypes.README create mode 100644 ayarlar/mate/.config/geany/geany.conf create mode 100644 ayarlar/mate/.config/geany/keybindings.conf create mode 100644 ayarlar/mate/.config/geany/templates/templates.README create mode 100644 ayarlar/mate/.config/mimeapps.list create mode 100644 ayarlar/mate/.config/user-dirs.dirs create mode 100644 ayarlar/mate/.config/user-dirs.locale create mode 100644 mps-0.8/fonks.sh create mode 100755 mps-0.8/mps create mode 100755 mps-0.8/mpsd create mode 100644 mps-0.8/mpsd.conf create mode 100644 mps-0.8/onmpsd.conf diff --git a/ayarlar/mate/.config/caja/accels b/ayarlar/mate/.config/caja/accels new file mode 100644 index 000000000..06d2a8a72 --- /dev/null +++ b/ayarlar/mate/.config/caja/accels @@ -0,0 +1,173 @@ +; caja GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/DirViewActions/Trash" "") +; (gtk_accel_path "/DirViewActions/Save Search" "") +; (gtk_accel_path "/IconViewActions/Sort by Emblems" "") +; (gtk_accel_path "/DirViewActions/Start Volume" "") +; (gtk_accel_path "/NavigationActions/TabsNext" "Page_Down") +; (gtk_accel_path "/DirViewActions/Location Poll" "") +; (gtk_accel_path "/ShellActions/Go to Trash" "") +; (gtk_accel_path "/SpatialActions/Go to Location" "l") +; (gtk_accel_path "/IconViewActions/Stretch" "") +; (gtk_accel_path "/NavigationActions/Tab8" "9") +; (gtk_accel_path "/DirViewActions/MoveToMenu" "") +; (gtk_accel_path "/ShellActions/ZoomInAccel" "equal") +; (gtk_accel_path "/DirViewActions/LocationTrash" "") +; (gtk_accel_path "/DirViewActions/RenameSelectAll" "F2") +; (gtk_accel_path "/NavigationActions/Back" "Left") +; (gtk_accel_path "/DirViewActions/Undo" "z") +; (gtk_accel_path "/NavigationActions/Tab7" "8") +; (gtk_accel_path "/DirViewActions/Location Start Volume" "") +; (gtk_accel_path "/DirViewActions/CopyToMenu" "") +; (gtk_accel_path "/NavigationActions/Add Bookmark" "d") +; (gtk_accel_path "/DirViewActions/Empty Trash" "") +; (gtk_accel_path "/ShellActions/Close" "w") +; (gtk_accel_path "/DirViewActions/LocationRestoreFromTrash" "") +; (gtk_accel_path "/IconViewActions/Manual Layout" "") +; (gtk_accel_path "/ExtensionsMenuGroup/CajaOpenTerminal::open_terminal" "") +; (gtk_accel_path "/ShellActions/Zoom Normal" "0") +; (gtk_accel_path "/NavigationActions/Tab1" "2") +; (gtk_accel_path "/NavigationActions/Show Hide Extra Pane" "F3") +; (gtk_accel_path "/DirViewActions/Create Link" "m") +; (gtk_accel_path "/NavigationActions/Clear History" "") +; (gtk_accel_path "/DirViewActions/LocationDelete" "") +; (gtk_accel_path "/IconViewActions/Sort by Trash Time" "") +; (gtk_accel_path "/DirViewActions/OtherApplication2" "") +; (gtk_accel_path "/DirViewActions/OpenInNewTab" "o") +; (gtk_accel_path "/DirViewActions/OtherApplication1" "") +; (gtk_accel_path "/NavigationActions/Show Hide Statusbar" "") +; (gtk_accel_path "/NavigationActions/Folder Window" "") +; (gtk_accel_path "/NavigationActions/Tab9" "0") +; (gtk_accel_path "/ShellActions/Connect to Server" "") +; (gtk_accel_path "/ShellActions/Help" "") +; (gtk_accel_path "/NavigationActions/Tab6" "7") +; (gtk_accel_path "/NavigationActions/Tab5" "6") +; (gtk_accel_path "/ShellActions/ZoomInAccel2" "KP_Add") +; (gtk_accel_path "/NavigationActions/Tab3" "4") +; (gtk_accel_path "/NavigationActions/Tab2" "3") +; (gtk_accel_path "/NavigationActions/ShowSearch" "f") +; (gtk_accel_path "/NavigationActions/Tab0" "1") +; (gtk_accel_path "/NavigationActions/Tab4" "5") +; (gtk_accel_path "/SpatialActions/Close All Folders" "q") +; (gtk_accel_path "/ShellActions/File" "") +; (gtk_accel_path "/DirViewActions/Format Volume" "") +; (gtk_accel_path "/NavigationActions/TabsPrevious" "Page_Up") +; (gtk_accel_path "/NavigationActions/TabsMoveRight" "Page_Down") +; (gtk_accel_path "/ShellActions/Caja Manual" "F1") +; (gtk_accel_path "/ClipboardActions/Paste" "v") +; (gtk_accel_path "/ShellActions/Go to Network" "") +; (gtk_accel_path "/DirViewActions/Mount Volume" "") +; (gtk_accel_path "/DirViewActions/Copy" "c") +; (gtk_accel_path "/IconViewActions/Sort by Type" "") +; (gtk_accel_path "/ShellActions/View" "") +; (gtk_accel_path "/DirViewActions/New Empty File" "") +; (gtk_accel_path "/ShellActions/About Caja" "") +; (gtk_accel_path "/DirViewActions/Location Eject Volume" "") +; (gtk_accel_path "/IconViewActions/Unstretch" "") +; (gtk_accel_path "/ShellActions/Zoom Out" "minus") +; (gtk_accel_path "/NavigationActions/Show Hide Location Bar" "") +; (gtk_accel_path "/DirViewActions/OpenCloseParent" "Down") +; (gtk_accel_path "/SpatialActions/Close Parent Folders" "w") +; (gtk_accel_path "/DirViewActions/Open" "o") +; (gtk_accel_path "/NavigationActions/Bookmarks" "") +; (gtk_accel_path "/DirViewActions/Self Format Volume" "") +; (gtk_accel_path "/DirViewActions/Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Connect To Server Link" "") +; (gtk_accel_path "/NavigationActions/Edit Bookmarks" "b") +; (gtk_accel_path "/DirViewActions/Location Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Reset to Defaults" "") +; (gtk_accel_path "/NavigationActions/SplitViewNextPane" "F6") +; (gtk_accel_path "/DirViewActions/Location Mount Volume" "") +; (gtk_accel_path "/DirViewActions/LocationCut" "") +; (gtk_accel_path "/ShellActions/Zoom In" "plus") +; (gtk_accel_path "/DirViewActions/LocationOpenFolderWindow" "") +; (gtk_accel_path "/DirViewActions/Self Eject Volume" "") +; (gtk_accel_path "/ClipboardActions/Select All" "a") +; (gtk_accel_path "/IconViewActions/Tighter Layout" "") +; (gtk_accel_path "/DirViewActions/Paste Files Into" "") +; (gtk_accel_path "/ClipboardActions/Copy" "c") +; (gtk_accel_path "/DirViewActions/LocationCopy" "") +; (gtk_accel_path "/DirViewActions/OpenAccel" "Down") +; (gtk_accel_path "/DirViewActions/Open With" "") +; (gtk_accel_path "/ShellActions/Edit" "") +; (gtk_accel_path "/ShellActions/Up" "Up") +; (gtk_accel_path "/DirViewActions/Open Scripts Folder" "") +; (gtk_accel_path "/ClipboardActions/Cut" "x") +; (gtk_accel_path "/NavigationActions/Forward" "Right") +; (gtk_accel_path "/DirViewActions/New Documents" "") +; (gtk_accel_path "/NavigationActions/Go to Location" "l") +; (gtk_accel_path "/ShellActions/Reload" "r") +; (gtk_accel_path "/DirViewActions/Move to Home" "") +; (gtk_accel_path "/ShellActions/Backgrounds and Emblems" "") +; (gtk_accel_path "/DirViewActions/No Templates" "") +; (gtk_accel_path "/DirViewActions/Location Format Volume" "") +; (gtk_accel_path "/ShellActions/ZoomOutAccel" "KP_Subtract") +; (gtk_accel_path "/NavigationActions/SplitViewSameLocation" "") +; (gtk_accel_path "/DirViewActions/LocationPasteFilesInto" "") +; (gtk_accel_path "/IconViewActions/Sort by Size" "") +; (gtk_accel_path "/DirViewActions/Select All" "a") +; (gtk_accel_path "/DirViewActions/OpenAlternate" "o") +; (gtk_accel_path "/ShellActions/Preferences" "") +; (gtk_accel_path "/DirViewActions/Poll" "") +; (gtk_accel_path "/DirViewActions/Select Pattern" "s") +; (gtk_accel_path "/DesktopViewActions/Change Background" "") +; (gtk_accel_path "/IconViewActions/Reversed Order" "") +; (gtk_accel_path "/ShellActions/Go to Computer" "") +; (gtk_accel_path "/NavigationActions/Go" "") +; (gtk_accel_path "/DirViewActions/Restore From Trash" "") +; (gtk_accel_path "/DirViewActions/Location Stop Volume" "") +; (gtk_accel_path "/DirViewActions/LocationProperties" "") +; (gtk_accel_path "/DirViewActions/Rename" "F2") +; (gtk_accel_path "/DirViewActions/Redo" "y") +; (gtk_accel_path "/ShellActions/Go to Templates" "") +; (gtk_accel_path "/ShellActions/Show Hidden Files" "h") +; (gtk_accel_path "/DirViewActions/Self Start Volume" "") +; (gtk_accel_path "/DirViewActions/Move to next pane" "") +; (gtk_accel_path "/DirViewActions/OpenFolderWindow" "") +; (gtk_accel_path "/DirViewActions/LocationOpenInNewTab" "") +; (gtk_accel_path "/DirViewActions/Duplicate" "") +; (gtk_accel_path "/DirViewActions/Eject Volume" "") +; (gtk_accel_path "/DirViewActions/Stop Volume" "") +; (gtk_accel_path "/NavigationActions/New Tab" "t") +; (gtk_accel_path "/DirViewActions/PropertiesAccel" "i") +; (gtk_accel_path "/NavigationActions/New Window" "n") +; (gtk_accel_path "/ShellActions/Home" "Home") +; (gtk_accel_path "/IconViewActions/Clean Up" "") +; (gtk_accel_path "/IconViewActions/Sort by Modification Date" "") +; (gtk_accel_path "/DirViewActions/Save Search As" "") +; (gtk_accel_path "/NavigationActions/Search" "") +; (gtk_accel_path "/IconViewActions/Keep Aligned" "") +; (gtk_accel_path "/DirViewActions/New Launcher" "") +; (gtk_accel_path "/DirViewActions/Properties" "Return") +; (gtk_accel_path "/SpatialActions/Add Bookmark" "d") +; (gtk_accel_path "/NavigationActions/TabsMoveLeft" "Page_Up") +; (gtk_accel_path "/DirViewActions/Copy to Desktop" "") +; (gtk_accel_path "/ShellActions/Stop" "") +; (gtk_accel_path "/DirViewActions/New Folder" "n") +; (gtk_accel_path "/DirViewActions/Self Poll" "") +; (gtk_accel_path "/DirViewActions/Move to Desktop" "") +; (gtk_accel_path "/DirViewActions/Cut" "x") +; (gtk_accel_path "/view_as_4" "4") +; (gtk_accel_path "/DirViewActions/Delete" "Delete") +; (gtk_accel_path "/DesktopViewActions/New Launcher Desktop" "") +; (gtk_accel_path "/IconViewActions/Sort by Name" "") +; (gtk_accel_path "/view_as_2" "2") +; (gtk_accel_path "/view_as_3" "3") +; (gtk_accel_path "/DirViewActions/Paste" "v") +; (gtk_accel_path "/DirViewActions/Invert Selection" "i") +; (gtk_accel_path "/view_as_1" "1") +; (gtk_accel_path "/DesktopViewActions/Empty Trash Conditional" "") +; (gtk_accel_path "/NavigationActions/Close All Windows" "q") +; (gtk_accel_path "/IconViewActions/Arrange Items" "") +; (gtk_accel_path "/NavigationActions/Show Hide Sidebar" "F9") +; (gtk_accel_path "/DirViewActions/Self Stop Volume" "") +; (gtk_accel_path "/SpatialActions/Places" "") +; (gtk_accel_path "/NavigationActions/Show Hide Toolbar" "") +; (gtk_accel_path "/SpatialActions/Edit Bookmarks" "b") +; (gtk_accel_path "/DirViewActions/Copy to Home" "") +; (gtk_accel_path "/DirViewActions/Self Mount Volume" "") +; (gtk_accel_path "/SpatialActions/Search" "f") +; (gtk_accel_path "/DirViewActions/Self Unmount Volume" "") +; (gtk_accel_path "/DirViewActions/Copy to next pane" "") +; (gtk_accel_path "/DirViewActions/LocationOpenAlternate" "") diff --git a/ayarlar/mate/.config/caja/desktop-metadata b/ayarlar/mate/.config/caja/desktop-metadata new file mode 100644 index 000000000..b687970f7 --- /dev/null +++ b/ayarlar/mate/.config/caja/desktop-metadata @@ -0,0 +1,23 @@ +[directory] +caja-icon-view-keep-aligned=true +caja-icon-view-layout-timestamp=1486554894 + +[home] +caja-icon-position=64,102 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[grub_uefi.volume] +caja-icon-position=64,182 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[trash] +caja-icon-position=64,262 +icon-scale=1 +caja-icon-position-timestamp=1486554894 + +[computer] +caja-icon-position=64,22 +icon-scale=1 +caja-icon-position-timestamp=1486554894 diff --git a/ayarlar/mate/.config/dconf/user b/ayarlar/mate/.config/dconf/user new file mode 100644 index 0000000000000000000000000000000000000000..506eb50de885a44dea5fa2e7c3b9b5c36585d24a GIT binary patch literal 5604 zcmaKwdvH|M9mg*(d4!jMHfU_XRYYOkHEdoBVwOAv0~Cx%R9<&CH_0WNy>a)35Nj(| zNbV!zA=s7SPM#2~v3*%rymWk*jI1kRx zL3K}t3!os&MX2~DOo5BDT!K!6%LXum&mx$^mG}^Z;i|JxL@WZuSxV4Sh-R6MiaA-X zM#WsX1}buh;pb(kL`4l;3-jSRsLf#!elaYC>!A*AfE%;aqqo3HSPg5km}o8uK8yC^ z?hz|c&Cz&coiPQS2G8BG`U&+%K96`AIu}0s#nlJZM)?uOLSsI<2L5vAJttI;{6xyH zN52bSAD(ea_mw|~_-1q~G&B?x>i+Voe>=JpRt8@ENOLT&`X5CfgXrq5Y0a^`+PM$y zhQWpVH>!U55yTIpZ^H|}tbSJId{4nDA zXaW4^rX6$CFZs#TQ-;olnbqGdQC$9f;`Qh)u;6Fg9@V(Xt3AzV3g<<}Q_&A4_}# zx(OaE`STCePWj=)??uxrg4^DCvR3uTpG$l*x)mOKo@?Tzgat!?dX8dGPk>*`q^G>IYA@FhO%AqPR@68uF8NQr;SDo@r-kTTn zIvBM1%Q{mQ2&1PAh^%{>4=uB{21a#&|~oHmpR_ zM0hZ~JEHc;D?SAcz^NCWUJxcOKZbZ1odw^&>pQor9(lFD0n{>u-dd>J|yp5Aic8I6y;@?i;D2ao;uk$oyJKa_Yqx(Y(q zzdLj>ae3_n4X6vdeqVTZ0daY?X9IdKY}yugG!F6_&+X^~VAKY;Y2T1nzaB!n;LwZj z#WkMt8i&2;ALN$}d0*|6*E%|kz6E2B9=KF-dA0vT^kdlh^&5>>5tl!Y_y{_a2cN&( zlhFE=_s%ag49`Dx>ln?8yy}^c*23nQ3kp=fyxL!n-XbRbeWl9FYkr&2TVdQ=#d9@} z@?JipTVVQ*E9R;mdDXuQ-3|Ym^2g3f;_{;yhc0w4bUw5usPgjplvn22FyocLNR;bubqv!vFIa#HtzlP(wxt(+pEq-8-5$|^szy6Gs$=FVc`t_XH=%lTtG!1MBCY+>`CS(M{ITtNz zb27HeSM)c-j+=>={@)1HWUneNl}|g3cG6N8yl3)+xz?1|+HJH@nIGp^}c!9=r} zYO;cH%cAF8@tmPjFqpP97~bEs$Hn_K#S7b+q|pHRvrtNg!Q*bWh54kd4G-u^qrF8lHyn-7KsK*i%W}(!^Pp! zd8PBB0hKQ=D+=qo(LmKK{*_jhR@PM3L<7aTRD4$PtZ1ORrn;u6-2WF1l*P(oG^a>) zM*|eEtS+xEkJLo?UTINjQF%?df_#cq#i~kcN^AH+nco(DPyeX1_o}RB1!vmK6p56! zo0?rl)=so|L!o7qOzyFpt? zzdV&_;X{p?aGi8#G+Ni}bX58E$Gl=Rsl!e+I32;HopD3Tp=q!X%0a*H8mvaMJ?Vz@ zyDj{jo*gf@vyHa< zbI!QuPCoTk>Ms6F_vJuNOkZFG*sbDr(snyTIy2a>TFvZ+P!tI^JMARtfC=rJ&jI%v zm~YFy+*(L#`Hi5WwzSpg?OVm%D+t+H^R_GHA4iY(yZmyrZ|Cu5g0E&WM7{AEIDP{^ zC)#OqYp}OB*-by_k5^w_^&SS%v5;PI35*?$M3BWu8I&se|9d$YPOo78?oxL@u<2zl>nBGk7E0&pdC!ZGjs za-F88q<_5iWo$fS-)8a5#HDkSiMSD~&w9V1_Z)F2*>{2sJimGezc-IHkIO)}({pdX z(HOA4l!0y8eB=8$=Tl$fs3CV9C{@}s+7~FFv(ud3IkX>Ub987PEB>sDi(2`9?oD)` zv#+au(cXE|uYD{6PzA%_e{YqP5dZ)H literal 0 HcmV?d00001 diff --git a/ayarlar/mate/.config/geany/filedefs/filetypes.README b/ayarlar/mate/.config/geany/filedefs/filetypes.README new file mode 100644 index 000000000..2d1f679bb --- /dev/null +++ b/ayarlar/mate/.config/geany/filedefs/filetypes.README @@ -0,0 +1,2 @@ +Copy files from /usr/share/geany to this directory to overwrite them. To use the defaults, just delete the file in this directory. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit http://www.geany.org/). \ No newline at end of file diff --git a/ayarlar/mate/.config/geany/geany.conf b/ayarlar/mate/.config/geany/geany.conf new file mode 100644 index 000000000..1cb69e68e --- /dev/null +++ b/ayarlar/mate/.config/geany/geany.conf @@ -0,0 +1,221 @@ +[geany] +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=2 +sidebar_pos=0 +msgwin_orientation=1 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=false +detect_indent_width=false +use_tab_to_indent=true +pref_editor_tab_width=4 +indent_mode=2 +indent_type=1 +virtualspace=1 +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme= +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=true +indent_hard_tab_width=8 +find_selection_type=0 +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +allow_always_save=false +statusbar_template=satır: %l / %L kol: %c seç: %s %w %t %mmode: %M kodlama: %e dosyatürü: %f alan: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +documents_show_paths=true +sidebar_page=0 +pref_main_load_session=true +pref_main_project_session=true +pref_main_project_file_in_basedir=false +pref_main_save_winpos=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=true +sidebar_openfiles_visible=true +editor_font=Monospace 10 +tagbar_font=Sans 9 +msgwin_font=Monospace 9 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=0 +use_native_windows_dialogs=false +show_indent_guide=false +show_white_space=false +show_line_endings=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=72 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=false +auto_close_xml_tags=true +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=72 +auto_continue_multiline=true +comment_toggle_mark=~ +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=None +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=true +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=mahmuy g +pref_template_company= +pref_template_mail=mahmut@milis +pref_template_initial=mg +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=true +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +scribble_text=Buraya istediğinizi yazabilirsiniz. Karalama defteri olarak kullanabilirsiniz. +scribble_pos=78 +treeview_position=156 +msgwindow_position=368 +geometry=61;69;900;600;0; +custom_date_format= + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +find_all_expanded=false +replace_all_expanded=false +position_find_x=-1 +position_find_y=-1 +position_replace_x=-1 +position_replace_y=-1 +position_fif_x=-1 +position_fif_y=-1 +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=false +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=true + +[plugins] +load_plugins=true +custom_plugin_path= +active_plugins=; + +[tools] +terminal_cmd=xterm -e "/bin/sh %c" +browser_cmd=firefox +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[VTE] +load_vte=true +emulation=xterm +send_selection_unsafe=false +send_cmd_prefix= +font=Monospace 10 +scroll_on_key=true +scroll_on_out=true +enable_bash_keys=true +ignore_menu_bar_accel=false +follow_path=false +run_in_vte=false +skip_run_script=false +cursor_blinks=false +scrollback_lines=500 +image= +shell=/bin/bash +colour_fore=#FFFFFF +colour_back=#000000 +last_dir=/home/mahmut + +[project] +session_file= +project_file_path=/home/mahmut/projeler + +[files] +recent_files=/home/mahmut/.config/user-dirs.locale;/home/mahmut/.config/user-dirs.dirs;/home/mahmut/.config/mimeapps.list; +recent_projects= +current_page=2 +FILE_NAME_0=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fmimeapps.list;0;4 +FILE_NAME_1=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fuser-dirs.dirs;0;4 +FILE_NAME_2=0;None;0;EUTF-8;1;1;0;%2Fhome%2Fmahmut%2F.config%2Fuser-dirs.locale;0;4 diff --git a/ayarlar/mate/.config/geany/keybindings.conf b/ayarlar/mate/.config/geany/keybindings.conf new file mode 100644 index 000000000..e69de29bb diff --git a/ayarlar/mate/.config/geany/templates/templates.README b/ayarlar/mate/.config/geany/templates/templates.README new file mode 100644 index 000000000..4e21a8abf --- /dev/null +++ b/ayarlar/mate/.config/geany/templates/templates.README @@ -0,0 +1,2 @@ +There are several template files in this directory. For these templates you can use wildcards. +For more information read the documentation (in /usr/share/doc/geany/html/index.html or visit http://www.geany.org/). \ No newline at end of file diff --git a/ayarlar/mate/.config/mimeapps.list b/ayarlar/mate/.config/mimeapps.list new file mode 100644 index 000000000..b9751f787 --- /dev/null +++ b/ayarlar/mate/.config/mimeapps.list @@ -0,0 +1,5 @@ +[Default Applications] +application/octet-stream=geany.desktop + +[Added Associations] +application/octet-stream=geany.desktop; diff --git a/ayarlar/mate/.config/user-dirs.dirs b/ayarlar/mate/.config/user-dirs.dirs new file mode 100644 index 000000000..3bc554f4e --- /dev/null +++ b/ayarlar/mate/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Masaüstü" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Şablonlar" +XDG_PUBLICSHARE_DIR="$HOME/Genel" +XDG_DOCUMENTS_DIR="$HOME/Belgeler" +XDG_MUSIC_DIR="$HOME/Müzik" +XDG_PICTURES_DIR="$HOME/Resimler" +XDG_VIDEOS_DIR="$HOME/Videolar" diff --git a/ayarlar/mate/.config/user-dirs.locale b/ayarlar/mate/.config/user-dirs.locale new file mode 100644 index 000000000..ad989beec --- /dev/null +++ b/ayarlar/mate/.config/user-dirs.locale @@ -0,0 +1 @@ +tr_TR \ No newline at end of file diff --git a/mps-0.8/fonks.sh b/mps-0.8/fonks.sh new file mode 100644 index 000000000..4c60ef0e8 --- /dev/null +++ b/mps-0.8/fonks.sh @@ -0,0 +1,244 @@ +#!/bin/sh + +. /usr/bin/gettext.sh +alias sed="busybox sed" + +# Internal +lgettext() { gettext -d 'x' "$@"; } +translate_query() { + case $1 in + y) lgettext "y";; + Y) lgettext "Y";; + n) lgettext "n";; + N) lgettext "N";; + # Support other cases but keep them untranslated. + *) echo "$1" ;; + esac +} +okmsg="$(lgettext 'Done')" +ermsg="$(lgettext 'Failed')" +: ${okcolor=32} +: ${ercolor=31} +: ${decolor=36} + +# Parse cmdline options and store values in a variable. +for opt in "$@"; do + opt_name="${opt%%=*}"; opt_name="$(echo -n "${opt_name#--}" | tr -c 'a-zA-Z0-9' '_')" + case "$opt" in + --[0-9]*=*) export _$opt_name="${opt#*=}" ;; + --[0-9]*) export _$opt_name=yes ;; + --*=*) export $opt_name="${opt#*=}" ;; + --*) export $opt_name=yes ;; + esac +done +[ "$HTTP_REFERER" ] && output='html' + + + + +# i18n functions +_() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; echo; } +_n() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; } +_p() { local S="$1" P="$2" N="$3"; shift 3; printf "$(ngettext "$S" "$P" "$N")" "$@"; } + +# Get terminal columns +get_cols() { stty size 2>/dev/null | awk -vc=$cols 'END{print c?c:($2 && $2<80)?$2:80}'; } + +# Last command status +status() { + local ret_code=$? + [ -n "$quiet" -a "$ret_code" -eq 0 ] && return + [ -n "$quiet" ] && action "$saved_action" no-quiet + + case $ret_code in + 0) local msg="$okmsg" color="$okcolor";; + *) local msg="$ermsg" color="$ercolor";; + esac + case $output in + raw|gtk) echo " $msg";; + html) echo " $msg";; + *) echo -e "[ \\033[1;${color}m$msg\\033[0;39m ]";; + esac +} + +# Line separator +separator() { + [ -n "$quiet" ] && return + case $output in + gtk) echo '--------';; + html) echo -n '
';; + *) printf "%$(get_cols)s\n" | tr ' ' "${1:-=}";; + esac +} + +# New line +newline() { + [ -z "$quiet" ] && echo +} + +# Display a bold message +boldify() { + [ -n "$quiet" ] && return + case $output in + raw) echo "$@" ;; + gtk) echo "$@" ;; + html) echo "$@" ;; + *) echo -e "\\033[1m$@\\033[0m" ;; + esac +} + +# renkli mesaj +ryaz() { + [ -n "$quiet" ] && return + : ${color=$1} + shift + case $output in + raw|gtk) echo "$@";; + html) echo -n "$@";; + *) case $color in + 0*) echo -e "\\033[${color:-38}m$@\\033[39m";; + *) echo -e "\\033[1;${color:-38}m$@\\033[0;39m";; + esac;; + esac + unset color +} + +# Indent text +indent() { + [ -n "$quiet" ] && return + local in="$1" + shift + echo -e "\033["$in"G $@"; +} + +# Extended MeSsaGe output +emsg() { + [ -n "$quiet" ] && return + local sep="\n$(separator)\n" + case $output in + raw) + echo "$@" | sed -e 's|||g; s|||g; s|||g; \ + s|||g; s|<->|'$sep'|g; s||\n|g; s|| |g' ;; + gtk) + echo "$@" | sed -e 's|||g; s|||g; s|<->|'$sep'|g; \ + s||\n|g; s|| |g' ;; + html) + echo "$@" | sed -e 's|||g; s|||g; \ + s|||g; s|||g; \ + s||
|g; s|<->|
|g; s|| |g' ;; + *) + echo -en "$(echo "$@" | sed -e 's||\\033[1m|g; s||\\033[0m|g; + s||\\033[\1m|g; s||\\033[1;\1m|g; + s||\\033[0;39m|g; s||\n|g; + s|<->|'$sep'|g; s||\\033[\1G|g')" + [ "$1" != "-n" ] && echo + ;; + esac +} + +# Check if user is logged as root +check_root() { + if [ $(id -u) -ne 0 ]; then + lgettext "You must be root to execute:"; echo " $(basename $0) $@" + exit 1 + fi +} + +# Display debug info when --debug is used. +debug() { + [ -n "$debug" ] && echo "$(colorize $decolor 'DEBUG:') $1" +} + +# Confirmation +confirm() { + if [ -n "$yes" ]; then + true + else + if [ -n "$1" ]; then + echo -n "$1 " + else + echo -n " ($(translate_query y)/$(translate_query N)) ? " + fi + read answer + [ "$answer" == "$(translate_query y)" ] + fi +} + +# Log islemleri +log() { + echo "$(date '+%F %R') : $@" >> ${faaliyet:-/var/log/islem.log} +} + +# Print two-column list of options with descriptions +optlist() { + [ -n "$quiet" ] && return + local in="$(echo "$1" | sed 's| *| |g')" w=$(get_cols) col1=1 line + IFS=$'\n' + for line in $in; do + col=$(echo -n "$line" | cut -f1 | wc -m) + [ $col -gt $col1 ] && col1=$col + done + echo "$in" | sed 's|\t|&\n|' | fold -sw$((w - col1 - 4)) | \ + sed "/\t/!{s|^.*$|[$((col1 + 4))G&|g}" | sed "/\t$/{N;s|.*| &|;s|\t\n||}" +} + +# Wrap words in long terminal message +longline() { + [ -n "$quiet" ] && return + local w=$(get_cols) + echo -e "$@" | fold -sw$w +} + +# Print localized title +title() { + [ -n "$quiet" ] && return + case $output in + html) echo "
$(_ "$@")
";;
+		*) newline; boldify "$(_ "$@")"; separator;;
+	esac
+}
+
+# Print footer
+footer() {
+	[ -n "$quiet" ] && return
+	case $output in
+		html) echo "
$1
";; + *) separator; echo "$1"; [ -n "$1" ] && newline;; + esac +} + +# Print current action +saved_action='' +action() { + saved_action="$1" + [ -n "$quiet" -a -z "$2" ] && return + local w c scol msg chars + w=$(_ 'w'); w=${w/w/10} + c=$(get_cols) + scol=$(( $c - $w )) + msg="$(_n "$@" | fold -sw$scol)" + chars=$(echo -n "$msg" | tail -n1 | wc -m) + msg="$(printf '%s%'$(( $scol - $chars ))'s' "$msg" '')" + + case $output in + raw|gtk|html) echo -n "$msg";; + *) echo -ne "\033[0;33m$msg\033[0m";; + esac +} + +# Print long line as list item +itemize() { + [ -n "$quiet" ] && return + case $output in + gtk) echo "$@";; + *) + local inp="$@" w=$(get_cols) first offset + first="$(echo -e "$inp" | fold -sw$w | head -n1)" + echo "$first" + cols1="$(echo "${first:1}" | wc -c)" + offset=$(echo "$first" | sed -n 's|^\([^:\*-]*[:\*-]\).*$|\1|p' | wc -m) + echo "${inp:$cols1}" | fold -sw$((w - offset)) | awk \ + '($0){printf "%'$offset's%s\n","",$0}' + ;; + esac +} diff --git a/mps-0.8/mps b/mps-0.8/mps new file mode 100755 index 000000000..14ed6b647 --- /dev/null +++ b/mps-0.8/mps @@ -0,0 +1,1301 @@ +#!/bin/bash +. /etc/mpsd.conf +if [ -f /etc/mps.conf ];then +. /etc/mps.conf +fi +. /root/bin/fonks.sh +versiyon="0.8.6" +iletisim="milisarge@gmail.com" +paketdepo="/depo/paketler/" +if [ -z ${sunucu+:} ]; then + sunucu="127.0.0.1:8000/" +fi +#sunucu="http://milis.gungre.ch/packages/" +git_sunucu="https://github.com/milisarge/malfs-milis" +ikaynak="" +betikad=${0##*/} +kurulum_onay="evet" +talimatname_dizin="/root/talimatname" +kokdizin="/" +VT="/var/lib/pkg/DB" +TARIHCE_DIZIN="/var/lib/pkg/tarihce" +LOGDIZIN="/var/log/mps" +tekrarkur="hayir" +#temel paket koruma +tpk="evet" +if [ -z ${lokal+:} ]; then + lokal="tr" +fi +if [ -z ${docsil+:} ]; then + docsil="evet" +fi +if [ -z ${yerelsil+:} ]; then + yerelsil="evet" +fi + + +icerik_ekle(){ + paketad=`echo "$1" | cut -d'#' -f1` + paketad=`basename $paketad` + ryaz 34 $paketad" paketi kuruluyor-> $kokdizin" + tar -C /tmp --extract --file=$1 .PRE 1 2> /tmp/$paketad_pre.log + #kos-kur kontrolu + if [ -f /tmp/.PRE ];then + if [ "$kokdizin" == "/" ];then + bash /tmp/.PRE + else + cp /tmp/.PRE $kokdizin/tmp/$paketad.PRE + fi + rm /tmp/.PRE + fi + mkdir -p kur.$paketad && + tar xf $1 -C kur.$paketad && + #istenmeyen yerellerin silinmesi + if [ -d kur.$paketad/usr/share/locale ] && [ "$yerelsil" == "evet" ];then + for lkl in `ls kur.$paketad/usr/share/locale/`;do + if [ "$lkl" != "$lokal" ];then rm -r kur.$paketad/usr/share/locale/$lkl; fi + done + fi + #doc dizini silinmesi + if [ -d kur.$paketad/usr/share/doc ] && [ "$docsil" == "evet" ];then + rm -r kur.$paketad/usr/share/doc + fi + mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" && + cp -v -afr kur.$paketad/* $kokdizin > kur.$paketad/kurulan + cp kur.$paketad/kurulan /tmp/ &&cat kur.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan && + #mv kur.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files && + mv kur.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META && + + #kur-kos calistirilmasi + if [ -f kur.$paketad/.POST ];then + if [ "$kokdizin" == "/" ];then + bash kur.$paketad/.POST + else + cp kur.$paketad/.POST $kokdizin/tmp/$paketad.POST + fi + rm kur.$paketad/.POST + fi + + rm -r kur.$paketad + if [ -f $kokdizin/etc/ld.so.conf ];then + ldconfig -r $kokdizin + fi + ryaz 34 $paketad" paketi kuruldu." + loglama "$paketad paketi kuruldu." + +} + +paket_sil(){ + local paket kkont sil_onay oto_silme + paket="$1" + if [ "$2" ]; then + oto_silme="$2" + fi + if [ "$tpk" = "evet" ] && [ -d "$talimatname_dizin/temel/$1" ];then + ryaz 31 "$1 temel sistem paketidir.Silinemez!!!" + else + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + if [ -f "/var/lib/pkg/DB/$paket/kurulan" ];then + #dizin koruma + kurban_kurtar $1 + cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil + ryaz 31 "ters bagimliliklar" + ryaz 31 "------------------" + ters_bagimli_kontrol "$paket" + ryaz 31 "------------------" + ryaz 31 "kurban dosyalar" + ryaz 31 "------------------" + silme_kurban_kontrol /tmp/$paket.sil + ryaz 31 "------------------" + if [ "$oto_silme" = "evet" ];then + sil_onay="e" + else + while true; do + ryaz 34 $paket" paketi kaldırılsın mı?";read -p "e veya h-> " eh + case $eh in + [Ee]* ) sil_onay="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + fi + if [ "$sil_onay" = "e" ];then + xargs rm -r -f < /tmp/$paket.sil && + rm -r -f /var/lib/pkg/DB/"$paket" && + ryaz 34 $paket" paketi silindi." + loglama "$paket paketi silindi." + rm -f /tmp/$paket.sil + else + rm -f /tmp/$paket.sil + exit 1 + fi + + else + ryaz 31 "kritik mesaj:kurulanlar dosyası yok." + fi + else + ryaz 32 "paket zaten kurulu değil!" + fi + fi + +} +paket_ara(){ + paket="$1" + for pkt in `cat /depo/paketler/paket.vt | grep $paket | awk '{print $1}'`; do + pakdesc=$(find /root/talimatname -name "$pkt" | xargs -I % sed -n '1{p;q}' %/talimat | sed s'/# Description: //g'); + ryaz 34 "$pkt - $pakdesc"; + done +} +kelime_bul(){ + grep --color -H -ri "$1" /root/talimatname/ +} +paket_bilgi2(){ + local paket kkont + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + paket="$1" + cat /var/lib/pkg/DB/"$paket"/META + else + echo "paket kurulu değil!" + fi + +} + +paket_bilgi(){ + local paket kkont + kkont=`kurulu_kontrol "$1"` + if [ "$kkont" = "kurulu" ];then + paket="$1" + satir=`sed -n '1p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "AD:" ${satir:1:${#satir}-1} + satir=`sed -n '2p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "TN:" ${satir:1:${#satir}-1} + satir=`sed -n '3p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "UR:" ${satir:1:${#satir}-1} + satir=`sed -n '4p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "YP:" ${satir:1:${#satir}-1} + satir=`sed -n '5p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "PK:" ${satir:1:${#satir}-1} + satir=`sed -n '6p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "--:" ${satir:1:${#satir}-1} + satir=`sed -n '7p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "VS:" ${satir:1:${#satir}-1} + satir=`sed -n '8p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "RL:" ${satir:1:${#satir}-1} + satir=`sed -n '9p' < /var/lib/pkg/DB/"$paket"/META` + ryaz 32 "DZ:" `date -d @${satir:1:${#satir}-1}` + else + echo "paket kurulu değil!" + fi + +} + +yeniden_paketle(){ + cd $1 + bsdtar -r -f ../"$1".mps .META + bsdtar -r -f ../"$1".mps * + cd .. + lzip -9 "$1".mps +} + +derleme_listyap(){ + bagimlist=`bagimlilar "$1"` + + if [ "$bagimlist" != "talimatyok" ];then + for bagim in $bagimlist;do + + if [ "`cat tumbag.liste | grep $bagim`" != "$bagim" ];then + derleme_listyap "$bagim" + fi + + done + + if ! grep -Fxq "$1" tumbag.liste + then + ana="`find $talimatname_dizin -name $1`" + echo ${ana#"$talimatname_dizin"} + #sadece genel bagimliliklar derlenecek + echo "$1" >> tumbag.liste + if [ -d "$talimatname_dizin/genel/$1" ];then + echo "$1" >> bag.liste + fi + fi + else + ryaz 31 "$1 talimatı bulunamadı." + exit 1 + fi +} + +derleme_listbilgi(){ + ryaz 34 "yapim asamasında" +} + +paket_derle_liste(){ + for dpkt in `cat $1`;do + echo $dpkt "derleniyor...." + zorla_derle="yok" + paket_derle $dpkt + done +} +#otomatik derle kontrollu kur +paket_derle_kur(){ + tekrarkur="hayir" + mps -dly "$1" && mps -derlist bag.liste +} + +paket_kur_oto(){ + local kpkt pkt pak kliste + if [ "$1" = "-H" ];then + ls *.mps.lz > "otokur.list" + kliste="otokur.list" + else + kliste="$1" + fi + for kpkt in `cat $kliste`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + mps -k "$pak" && mps -kur "$pkt" + done + done + rm -rf otokur.list +} + +paket_kur_oto_zorla(){ + local kpkt pkt pak kliste + if [ "$1" = "-H" ];then + ls *.mps.lz > "otokur.list" + kliste="otokur.list" + else + kliste="$1" + fi + for kpkt in `cat $kliste`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + paket_sil "$pkt" "evet" + mps -k "$pak" && mps -kur "$pkt" + done + done + rm -rf otokur.list +} + +paket_kur_liste(){ + local kpkt pkt pak + for kpkt in `cat $1`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + mps -k "$pak" + done + done +} + +paket_kur_liste_zorla(){ + local kpkt pkt pak + for kpkt in `cat $1`;do + for pkt in `ls $kpkt* | cut -d'#' -f1`;do + pak=`ls "$pkt#"*` + paket_sil "$kpkt" "evet" + mps -k "$pak" + done + done +} + +#otomatik kontrollu kur +paket_kur_oto2(){ + mps -dly "$1" > /dev/null && mps -ok bag.liste +} + +paket_inkur_liste_direk(){ + local kpkt + for kpkt in `cat $1`;do + mps -ik "$kpkt" + done +} + +paket_inkur_liste(){ + local kpkt + for kpkt in `cat $1`;do + mps -kur "$kpkt" + done +} + +#otomatik kontrollu kur +paket_inkur_oto(){ + mps -dly "$1" > /dev/null && + local kpkt + for kpkt in `cat bag.liste`;do + mps -ik "$kpkt" + done + rm -rf *.liste *.eski +} + +paket_sil_oto(){ + local spkt + for spkt in `cat $1`;do + oto_silme="evet" + paket_sil "$spkt" "$oto_silme" + done +} + +paket_guncelle(){ + surum_kontrol $1 + devir_kontrol $1 +} + +paket_guncelle_oto(){ + mps -dly "$1" > /dev/null && + local kpkt + for kpkt in `cat bag.liste`;do + mps -g "$kpkt" + done + rm bag.liste tumbag.liste +} + +sistem_guncelle(){ + local kpkt + for kpkt in `mps -kl`;do + mps -g "$kpkt" + done +} + +surum_kontrol(){ + local ksurum version pkt dusuk yuksek durum + durum="belirsiz" + satir=`sed -n '7p' < /var/lib/pkg/DB/"$1"/META` + ksurum=${satir:1:${#satir}-1} + pkt="`find $talimatname_dizin -name $1`" + source $pkt/talimat + dusuk=`echo -e "$ksurum\n$version" | sort -V | head -n1` + + if [ "$ksurum" = "$version" ];then + durum="guncel" + else + if [ "$ksurum" = "$dusuk" ];then + durum="yukselt" + else + durum="dusur" + fi + + if [ "$durum" <> "guncel" ];then + mps -s $1 + mps -ik $1 + fi + fi + ryaz 33 "$1 surum kontrolu $ksurum & $version $durum" +} + +devir_kontrol(){ + local kdevir release pkt dusuk yuksek durum + durum="belirsiz" + satir=`sed -n '8p' < /var/lib/pkg/DB/"$1"/META` + kdevir=${satir:1:${#satir}-1} + pkt="`find $talimatname_dizin -name $1`" + source $pkt/talimat + dusuk=`echo -e "$kdevir\n$release" | sort -V | head -n1` + + if [ "$kdevir" = "$release" ];then + durum="guncel" + else + if [ "$kdevir" = "$dusuk" ];then + durum="yukselt" + else + durum="dusur" + fi + + if [ "$durum" <> "guncel" ];then + mps -s $1 + mps -ik $1 + fi + fi + ryaz 33 "$1 devir kontrolu $kdevir & $release $durum" +} + +paket_derle(){ + #eski derleme kalıntılarını temizle + if [ -d tmp.* ];then + rm -r tmp.* + fi + kaynakdizin_kontrol + local konum derleme_onay eh bagimd + derleme_onay="h" + konum="`find "$talimatname_dizin" -name $1`" + if [ -d "$konum" ];then + mkdir -p tmp."$1" + cp -a $konum/* tmp."$1"/ + cd tmp."$1" + if [ "`kurulu_kontrol "$1"`" = "kurulu" ] && [ "$zorla_derle" = "yok" ];then + derleme_onay="h" + else + echo "-----" + derleme_onay="e" + fi + if [ "$derleme_onay" = "e" ];then + ryaz 33 "$1" "derleniyor...." + #mpsd -d > /dev/null + #mpsd -d + echo "------------------------" + mpsd -d 2>&1|tee /tmp/"$1".log + if ( grep "^=======>" /tmp/"$1".log| tail -1 |grep "ERROR" > /dev/null);then + echo "derleme sisteminde hata oluştu -----> " /tmp/"$1".log + exit 1 + fi + if [ "$kurulum_onay" = "evet" ];then + for kpkt in `ls $1* | cut -d'#' -f1`;do + mps -k "$kpkt#"* + done + fi + mv *.mps.lz ../ + else + ryaz 32 "paket zaten kurulu,yine de derlemek için: + mps -zd $1" + fi + cd .. + rm -r tmp."$1" + else + ryaz 31 "talimat dosyası bulunamadı." + fi + +} + + +bagimlilar(){ + local bagimd konum + konum="`find "$talimatname_dizin" -name $1`" + if [ -f "$konum/talimat" ];then + bagimd=`cat $konum/talimat | grep "Depends on" | cut -d':' -f2` + + if [ -n "$bagimd" ]; then + bagimd=`echo "$bagimd" | sed 's/,/ /g'` + #sıralı gösterme + echo `echo "$bagimd" | sed 's/,/ /g'` + fi + else + echo "talimatyok" + exit 1 + fi +} + +bagimli_bilgi(){ + local bagimd konum bag + konum="`find "$talimatname_dizin" -name $1`" + bagimd=`cat $konum/talimat | grep "Depends" | cut -d':' -f2` + if [ -n "$bagimd" ]; then + bagimd=`echo "$bagimd" | sed 's/,/ /g'` + #sıralı gösterme + #echo `echo "$bagimd" | sed 's/,/ /g'` + #kurulu kontrollu gosterim + for bag in $bagimd;do + echo $bag "`kurulu_kontrol $bag`" + done + fi + echo "$1" "`kurulu_kontrol $1`" + +} + +ters_bagimli(){ + local ara + ara=" $1 " + sy=`grep -o "/" <<<"$talimatname_dizin" | wc -l` + grep -rli "$ara" "$talimatname_dizin" | cut -d'/' -f`expr $sy + 3` +} + +silme_kurban_kontrol(){ + local dizin + for f in $(cat $1) ; do + dizin="${f%\'}" + dizin="${dizin#\'}" + if [ -d "$dizin" ];then + for g in `ls "$dizin"` ; do + if ! grep -Fxq " '$dizin/$g'" "$1" + then + echo "$dizin/$g" + fi + done + fi + done +} + +kurban_kurtar(){ + local dizin paket + paket=$1 + if [ -f /var/lib/pkg/DB/$paket/kurulan ];then + cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil + for f in $(cat /tmp/$paket.sil) ; do + dizin="${f%\'}" + dizin="${dizin#\'}" + if [ -d "$dizin" ];then + for g in `ls "$dizin"` ; do + if ! grep -Fxq " '$dizin/$g'" "/tmp/$paket.sil" + then + if [ -f /tmp/$paket.kurtar ];then + rm /tmp/$paket.kurtar + fi + echo " '$dizin'" >> "/tmp/$paket.kurtar" + fi + done + fi + done + if [ -f /tmp/$paket.kurtar ];then + mv /var/lib/pkg/DB/$paket/kurulan /var/lib/pkg/DB/$paket/ilk.kurulan + grep -v -F -x -f "/tmp/$paket.kurtar" "/tmp/$paket.sil" > /var/lib/pkg/DB/$paket/kurulan + ryaz 32 "$paket kurban dosyaları kurtarıldı." + else + ryaz 32 "$paket kurban dosyası yok." + fi + rm -f /tmp/$paket.sil + else + ryaz 31 "kurulan paket yok!" + fi +} + +ters_bagimli_kontrol(){ + ters_bagimli "$1" | sort > tersb.liste + ls /var/lib/pkg/DB/ | sed "/$1/d" | sort > simdiki.liste + comm -12 tersb.liste simdiki.liste + rm tersb.liste simdiki.liste +} + +kurulu_kontrol(){ + if [ -d "$kokdizin/var/lib/pkg/DB/$1" ];then + echo "kurulu" + exit 1 + fi + echo "degil" +} + +sistem_kur(){ + local spaket + for spaket in `cat $1`;do + ./$betikad -ik "$spaket" -kok $2; + done +} + +kaynakdizin_kontrol(){ + if [ ! -d $DERLEME_KAYNAKDIZIN ];then + mkdir $DERLEME_KAYNAKDIZIN + fi +} + +logdizin_kontrol(){ + if [ ! -d $kokdizin$LOGDIZIN ];then + mkdir $kokdizin$LOGDIZIN + fi + if [ ! -d $kokdizin$LOGDIZIN/derleme ];then + mkdir $kokdizin$LOGDIZIN/derleme + fi + if [ ! -f $kokdizin$LOGDIZIN/mps.log ];then + touch $kokdizin$LOGDIZIN/mps.log + fi +} + +tarihce_dkontrol(){ + if [ ! -d $TARIHCE_DIZIN ];then + mkdir $TARIHCE_DIZIN + fi +} + +temel_tarihce_kontrol(){ + if [ ! -f $TARIHCE_DIZIN/temel-pkvt.tar.lz ];then + tarihce_olustur "temel" + fi +} + +tarihce_liste(){ + tarihce_dkontrol + ls $TARIHCE_DIZIN/ + +} + +tarihce_yap(){ + tarihce_dkontrol + local t_isim + if [ "$temel_tarihce" = "evet" ];then + t_isim="temel" + else + t_isim=`date +%m-%d-%y.%H%M%S` + fi + tarihce_olustur "$t_isim" +} + +tarihce_olustur(){ + bsdtar -P -r -f $TARIHCE_DIZIN/"$1"-pkvt.tar $VT + lzip -9 $TARIHCE_DIZIN/"$1"-pkvt.tar +} + +tarihce_yukle(){ + tarihce_dkontrol + local islem_onay cikis + sil_onay="h" + if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then + bsdtar -p -o -C /tmp -xf $TARIHCE_DIZIN/"$1-pkvt.tar.lz" 2>/dev/null + ls /tmp/var/lib/pkg/DB/ > hedef.pkvt + ls /var/lib/pkg/DB/ > simdiki.pkvt + grep -v -F -x -f hedef.pkvt simdiki.pkvt > sil.liste + grep -v -F -x -f simdiki.pkvt hedef.pkvt > kur.liste + #rm hedef.pkvt simdiki.pkvt + rm -r /tmp/var + cikis="" + if [ -s sil.liste ];then + ryaz 32 "silinecekler" + ryaz 32 "------------" + cat sil.liste + fi + + if [ -s kur.liste ];then + ryaz 32 "kurulacaklar" + ryaz 32 "------------" + cat kur.liste + fi + if [ ! -s sil.liste ] && [ ! -s kur.liste ];then + ryaz 32 "sistem zaten hedef durumda!" + exit 1 + fi + while true; do + ryaz 34 "otomatik geri dönüşüm başlasın mı?";read -p "e veya h-> " eh + case $eh in + [Ee]* ) islem_onay="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + if [ "$islem_onay" = "e" ];then + mps -os sil.liste + mps -kurul kur.liste + mv sil.liste silinenler.liste + mv kur.liste kurulanlar.liste + exit 1 + fi + mv sil.liste sil_iptal.liste + mv kur.liste kur_iptal.liste + else + ryaz 31 "ilgili tarihce dosyası bulunamadı!" + fi +} + +tarihce_sil(){ + tarihce_dkontrol + if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then + rm -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" + else + ryaz 31 "ilgili tarihce dosyası bulunamadı!" + fi +} + +loglama(){ + logdizin_kontrol + echo "$(date +'%F %T') $1" >> "$kokdizin/$LOGDIZIN/mps.log" +} + +dosyadan_talimat_islem(){ + local dosya + dosya=$1 + urlkont='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' + if [[ $dosya =~ $urlkont ]] + then + ryaz 32 "talimat linkten cekilecek" + gdosya=`mktemp` + wget $dosya -O $gdosya + dosya=$gdosya + fi + if [ ! -f $dosya ];then + ryaz 31 "$dosya talimat dosyasi yok!" + exit 1 + fi + + local paketisim + paketisim=`grep -ri 'name=' $dosya | cut -d'=' -f 2` + if [ ! -n "$paketisim" ]; then + ryaz 31 "paket ismi degiskeni bulunamadı!" + exit 1 + fi + if [ ! -f /root/talimatname/genel/$paketisim ];then + mkdir /root/talimatname/genel/$paketisim + cp -f $dosya /root/talimatname/genel/$paketisim/talimat + ryaz 32 "$paketisim talimatı hazırlandı." + else + ryaz 31 "$paketisim talimatı zaten talimatnamede var!" + fi +} + +talimat_olustur(){ +if [ "$1" = '?' ];then + ryaz 34 "kullanım : mps -to paket_ismi" +else + local name + name=$1 + mkdir -p $name + tee "$name/talimat" > /dev/null < /dev/null; then + if [ $? -eq 0 ]; then + ryaz 32 "paket veritabanı guncellenıyor." "$paketdepo""paket.vt" + if [ -f "$paketdepo""paket.vt" ];then + mv "$paketdepo""paket.vt" "$paketdepo""paket.vt.eski" + fi + wget -q --show-progress -P "$paketdepo" "$sunucu""paket.vt" + #rm /tmp/paket.vt* + mps -kudo + exit 1 + fi + ryaz 31 "paket veritabanı guncelleme olumsuz." +} + +talimat_bilgi(){ + local konum HEAD + konum="`find "$talimatname_dizin" -name $1`" + HEAD=`grep -B 12 "build()" $konum/talimat` + echo $HEAD +} + +sistem_kontrol(){ + paketvt_kontrol + sunucu_kontrol +} + +sunucu_kontrol(){ + wget -q --spider $sunucu + if [ $? -eq 0 ]; then + ryaz 32 "paket sunucu aktif" + else + ryaz 31 "sunucu erişim dışı" + exit 1 + fi +} + +gitayar_kontrol(){ + if [ ! -f /root/.gitconfig ];then + git_ssl_iptal + git_otokimlik + fi +} + +kurulum_dogrulama(){ + for kuruland in `ls $VT` + do + if [ ! -f "$VT/$kuruland/kurulan" ]; then + ryaz 32 "$kuruland hasarlı kurulum tesbiti!" + rm -r $VT/$kuruland + mps -i $kuruland + mps -k "$paketdepo/$kuruland"*.mps.lz + ryaz 32 "$kuruland hasarlı kurulum onarıldı." + fi + done +} + +kurulum_dosya_listele(){ + cat "$VT/$1/kurulan" +} + +paketvt_kontrol(){ + mkdir -p /depo/paketler + if [ ! -f /depo/paketler/paket.vt ];then + touch /depo/paketler/paket.vt + fi +} + +pvt_olustur(){ + if [ ! -f paket.vt ];then + touch paket.vt + fi + if [ -f "paket.vt" ];then + mv "paket.vt" "paket.vt.eski" + fi + ryaz 32 "paket.vt oluşturuluyor...." + for paket in `ls *.mps.lz` + do + paketad="`echo $paket|cut -d "#" -f1`" + shaek=`sha1sum $paket` + + echo $paketad $shaek >> paket.vt + done + ryaz 32 "paket.vt oluşturuldu." +} + +paket_indir(){ + local pkt + if [ -f "$paketdepo""paket.vt" ];then + pkt=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f3` + ekontdeg=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f2` + cpaket="${pkt/'#'/'%23'}" + wget -nc -q --show-progress -P "$paketdepo" "$sunucu$cpaket" + if [[ "$?" != 0 ]]; then + ryaz 31 "indirme hatalı" + else + ryaz 34 "$1 indirildi" + fi + mkontdeg=`sha1sum "$paketdepo$pkt" | cut -d' ' -f1` + if [ "$ekontdeg" != "$mkontdeg" ];then + ryaz 31 "sha1sum uyusmaslik tesbit edildi,paket tekrar indiriliyor." + rm -f "$paketdepo$pkt" + paket_indir "$1" + fi + fi + + +} + +yardim(){ + echo "yardim" +} + + +ayarlar() { + + while [ "$1" ]; do + case $1 in + -i|--indir) + ikaynak="ag" + kurulum_onay="olumsuz";; + -ik|--inku) + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + fi + ikaynak="ag" ;; + -ikz|--inkuzo) + ikaynak="ag" + tekrarkur="evet" ;; + -k|--yrku) + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + tekrarkur="evet" + fi + ikaynak="yerel" ;; + -s|sil) + if [[ "$2" == "py-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip2 ile silinecek" + pip uninstall $pypaket + exit 1 + fi + if [[ "$2" == "py3-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip3 ile silinecek" + pip3 uninstall $pypaket + exit 1 + fi + paket_sil "$2" ;; + -sz|zorsil) + paket_sil "$2" "evet";; + -pa|ara) + paket_ara "$2" ;; + bul) + kelime_bul "$2" ;; + -d|--pkde) + zorla_derle="yok" + kurulum_onay="olumsuz" + paket_derle "$2" ;; + -zd|--pkzde) + zorla_derle="evet" + kurulum_onay="olumsuz" + paket_derle "$2" ;; + -dk|--pkdk) + paket_derle "$2" ;; + -derlist) + paket_derle_liste "$2" ;; + -derle) + paket_derle_kur "$2" ;; + -ok|--pkok) + paket_kur_oto "$2" ;; + -okz) + paket_kur_oto_zorla "$2" ;; + -okl|--pkokl) + paket_kur_liste "$2" ;; + -oklz) + paket_kur_liste_zorla "$2" ;; + -kh) + local templist + templist=`mktemp` + ls *.mps.lz > $templist + mps -okz -H $templist ;; + -ko|--pkko) + paket_kur_oto2 "$2" ;; + -kuruld) + paket_inkur_liste_direk "$2" ;; + -kurul) + paket_inkur_liste "$2" ;; + -kur) + paket_inkur_oto "$2" ;; + kur) + if [[ "$2" == "py-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip2 ile kurulacak" + pip install $pypaket + exit 1 + fi + if [[ "$2" == "py3-"* ]]; then + pypaket=`echo "$2" | cut -d'-' -f 2` + echo $pypaket "pip3 ile kurulacak" + pip3 install $pypaket + exit 1 + fi + if [[ "$2" == *"mps.lz"* ]]; then + if [ "$3" == "-kok" ] && [ -d "$4" ]; then + kokdizin="$4" + tekrarkur="evet" + fi + ikaynak="yerel" + else + paket_inkur_oto "$2" + fi ;; + gitkur) + git_proje_kur "$2" ;; + kurkos) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kur-kos ];then + bash $pkt/$2.kur-kos + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + koskur) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kos-kur ];then + bash $pkt/$2.kos-kur + else + ryaz 31 "$2 kos-kur yok!" + fi ;; + silkos) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.sil-kos ];then + bash $pkt/$2.sil-kos + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + kossil) + local pkt + pkt="`find $talimatname_dizin -name $2`" + if [ -f $pkt/$2.kos-sil ];then + bash $pkt/$2.kos-sil + else + ryaz 31 "$2 kur-kos yok!" + fi ;; + -kdl) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + kurulum_dosya_listele "$2" ;; + -pak|--paketle) + if [ ! "$2" ]; then + ryaz 31 "paketlenecek dizin ismi eksik" + exit 1 + fi + yeniden_paketle "$2" ;; + -psk|--paksiskur) + if [ ! "$2" ]; then + ryaz 31 "paket liste yok" + exit 1 + fi + if [ ! "$3" ]; then + ryaz 31 "hedef dizin yok" + exit 1 + fi + sistem_kur "$2" "$3" ;; + -po) + pvt_olustur ;; + -os|--pkos) + if [ ! "$2" ]; then + ryaz 31 "silme listesi yok" + exit 1 + fi + paket_sil_oto "$2" ;; + -kl|--kurulu-liste) + ls $VT ;; + -dly|--drly) + if [ -f tumbag.liste ];then + mv tumbag.liste tumbag.liste.eski + fi + if [ -f bag.liste ];then + mv bag.liste bag.liste.eski + fi + touch tumbag.liste + touch bag.liste + derleme_listyap "$2" ;; + -dlb|--drlb) + derleme_listbilgi "$2";; + -b|--pkbl) + paket_bilgi "$2" ;; + #sunucu bilgisi alma + -sun|--sunucu) + ryaz 32 $sunucu ;; + -bb|--pkbb) + bagimli_bilgi "$2" | column -t;; + -tb|--pktb) + ters_bagimli "$2" ;; + -tbk|--pktbk) + ters_bagimli_kontrol "$2" ;; + -talb|--talb) + talimat_bilgi "$2" | column -t;; + -to) + if [ ! "$2" ]; then + ryaz 31 "talimat ismi eksik" + exit 1 + fi + talimat_olustur "$2" ;; + guncelle) + mps -GG && mps -G ;; + -Ggit|-GG) + git_guncelle ;; + -G|--pvtg) + paketvt_guncelle + mps -kudo ;; + #komple kurulu sistemin guncellenmesi + -GS) + sistem_guncelle ;; + #tekil paket guncelleme-single package updating + -g|--pkgu) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + paket_guncelle "$2";; + #bagimliliklariyla beraber paket guncelleme-package updating with depencies + -go|--pkgo) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + paket_guncelle_oto "$2";; + -kk|--kurulu-kontrol) + if [ ! "$2" ]; then + ryaz 31 "paket ismi eksik" + exit 1 + fi + ryaz 31 `kurulu_kontrol "$2"`;; + -kudo) + kurulum_dogrulama ;; + -kdk) + kurban_kurtar $2 ;; + -suko) + sunucu_kontrol ;; + -dota) + dosyadan_talimat_islem $2 ;; + -cf|--config-file) + if [ ! "$2" ]; then + echo "ayardosyası gerek $1" + exit 1 + fi + ayar_dosyasi="$2" + shift ;; + -tro) + tarihce_yap ;; + -trot) + temel_tarihce="evet" + tarihce_yap ;; + -try) + if [ ! "$2" ]; then + ryaz 31 "tarihce dosyasi eksik $1" + exit 1 + fi + tarihce_yukle "$2" + shift ;; + -trl) + tarihce_liste ;; + -trs) + if [ ! "$2" ]; then + ryaz 31 "parametre eksik $1" + exit 1 + fi + tarihce_sil "$2" + shift ;; + -v) + ryaz 33 "$betikad $versiyon $iletisim" + exit 0 ;; + -h|--help) + yardim + exit 0 ;; + + esac + shift + done +} + +yardim() { + cat <<_EOF + +$betikad $versiyon Milis Paket Sistemi + +Secenekler: + -G ikili paket veritabanını günceller + -Ggit git sunucusundan talimatname ve sistem gunceller + -kur paket_ismi ilgili paketi bagimliliklariyla agdan cekip kurar + -s paket_ismi ilgili paketi kaldirir + -k paket_ismi yereldeki paketi bagimliliksiz kurar + -kl kurulu paket listesini verir + -kk paket_ismi ilgili paketin kurulu olma durumunu verir + -d paket_ismi ilgili paketin talimat dosyasına göre + sadece derler,paketler + -derle paket_ismi ilgili paketin talimat dosyasına göre bagimliliklariyla + beraber derler,paketler ve kurar. + +_EOF + exit 1 +} + +ana(){ +if [ `id -u` = 0 ] ; then + ayarlar "$@" + + if [ "$ikaynak" = "ag" ]; then + local kontroldeg + kkont=`kurulu_kontrol "$2"` + if [ "$kkont" = "degil" ] || [ "$tekrarkur" = "evet" ];then + pkt=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f3` + if [ ! -z "$pkt" -a "$pkt" != "" ]; then + cpaket="${pkt/'#'/'%23'}" + ryaz 33 "agdan cekiliyor:" "$2" + #paket sunucuda varsa + wget -q --spider "$sunucu$cpaket" + #if wget -P /tmp -q "$sunucu$cpaket" > /dev/null; then + if [ $? -eq 0 ]; then + #wget -P "$paketdepo" "$sunucu$cpaket" + paket_indir "$2" + + if [ "$kurulum_onay" = "evet" ];then + if [ "$tekrarkur" = "evet" ];then + paket_sil "$2" "evet" + fi + icerik_ekle "$paketdepo$pkt" + exit 1 + fi + else + ryaz 31 "paket sunucuda yok!" + fi + else + ryaz 31 "paket sunucuda yok!( mps -G komutuyla güncelleme yapınız. )" + fi + else + ryaz 32 "$2 paketi zaten kurulu!" + fi + exit 1 + fi + + if [ "$ikaynak" = "yerel" ]; then + local silme + pkontrol=`basename $2 | grep -w "mps.lz"` + if [ ! -z "$pkontrol" -a "$pkontrol" != "" ]; then + paketad=`echo "$2" | cut -d'#' -f1` + kkont=`kurulu_kontrol "$paketad"` + if [ "$kkont" = "degil" ];then + icerik_ekle "$2" + else + echo $tekrarkur + if [ "$tekrarkur" = "hayir" ];then + while true; do + ryaz 31 "$2 paketi zaten kurulu silinip kurulsun mu?" + read -p "e veya h -> " eh + case $eh in + [Ee]* ) silme="e"; break;; + [Hh]* ) break;; + * ) echo "e veya h";; + esac + done + fi + if [ "$silme" = "e" ];then + ryaz 33 "silinecekelerin kontrolu için" + paket_sil "$paketad" + icerik_ekle "$2" + fi + fi + else + ryaz 31 "yerelde mps paketi bulunamadı." + fi + fi +else + sudo mps "$@" +fi +} +ana "$@" + + +#31 kirmizi +#32 yesil +#33 sari +#34 mavi +#34 mor diff --git a/mps-0.8/mpsd b/mps-0.8/mpsd new file mode 100755 index 000000000..90a24465a --- /dev/null +++ b/mps-0.8/mpsd @@ -0,0 +1,1540 @@ +#!/bin/bash + +# error codes +E_GENERAL=1 +E_TALIMAT=2 # hatalı talimat +E_DIR_PERM=3 # (source/build) directory missing or missing read/write permission +E_DOWNLOAD=4 # error during download +E_UNPACK=5 # error during unpacking of source file(s) +E_MD5=6 # md5sum verification failed +E_FOOTPRINT=7 # footprint check failure +E_BUILD=8 # error while running 'build()' +E_INSTALL=9 # error while installing the package via 'pkgadd' +E_DEPS=10 # error while searching runtime deps via 'pkginfo -b' + +info() { + echo "=======> $1" +} +warning() { + info "UYARI: $1" >&2 +} +error() { + info "HATA: $1" >&2 +} +abort_on_build() { + error $1 + exit $E_BUILD +} +get_filename() { + if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then + echo "$DERLEME_KAYNAKDIZIN/${BASH_REMATCH[2]}" + else + echo $1 + fi +} +get_basename() { + local FILE="`echo $1 | sed 's|^.*://.*/||g'`" + echo $FILE +} +check_pkgfile() { + local NAME_TEST + if [ "${name}" == "" ]; then + error "Variable 'name' not initiated or not found in $PKGMK_PKGFILE." + exit $E_TALIMAT + elif [ "`type -t build`" != "function" ]; then + error "Function 'build' not specified in $PKGMK_PKGFILE." + exit $E_TALIMAT + fi + NAME_TEST=`echo "${name}" | sed 's@[[a-z0-9]*[-_+]*]*@@g'` + if [ "$NAME_TEST" != "" ]; then + error "Variable 'name' contains illegal characters: $NAME_TEST" + exit $E_TALIMAT + fi + if [ ${#name} -gt 50 ];then + error "Variable 'name' length higher then 50 characters." + exit $E_TALIMAT + fi + if [ "${version}" == "" ]; then + error "'versiyon' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." + exit $E_TALIMAT + fi + if [ "$SURUM_YOKSAY" = "yok" ]; then + if [ "${release}" == "" ]; then + error " 'release' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." + exit $E_TALIMAT + fi + fi + + +} +get_package_name() { + local NAME EXT + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXT=$PKT_UZANTISI + else + EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + fi + #eski + #NAME=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` + #echo "${NAME:0:$((${#NAME} - 10 ))}" + NAME=`echo "$1" | cut -d'#' -f1` + echo "$NAME" +} +get_package_builddate() { + local NAME BUILD_DATE EXT + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXT=$PKT_UZANTISI + else + EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + fi + NAME="`get_package_name $1`" + BUILD_DATE=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` + echo "${BUILD_DATE:$((${#NAME}))}" +} +get_package_extension() { + local EXTENSION + if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + EXTENSION=".$PKT_UZANTISI" + else + EXTENSION=".$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" + fi + echo $EXTENSION +} +get_package_arch() { + local NAME BUILD_DATE EXTENSION + NAME=`get_package_name $1` + BUILD_DATE=`get_package_builddate $1` + EXTENSION=`get_package_extension $1` + echo $1|sed "s/$NAME$BUILD_DATE//"|sed "s/$EXTENSION//" +} +check_directory() { + if [ ! -d $1 ]; then + error "Directory '$1' does not exist." + exit $E_DIR_PERM + elif [ ! -w $1 ]; then + error "Directory '$1' not writable." + exit $E_DIR_PERM + elif [ ! -x $1 ] || [ ! -r $1 ]; then + error "Directory '$1' not readable." + exit $E_DIR_PERM + fi +} +check_file() { + if [ -e $1 ] && [ ! -w $1 ]; then + error "File '$1' is not writable." + exit $E_GENERAL + fi +} +downloads_file_with_curl() { + if [ ! "`type -p curl`" ]; then + error "Command 'curl' not found." + exit $E_GENERAL + fi + DOWNLOAD_OPTS="--ftp-pasv --retry 3 --retry-delay 3 \ + -R -o $1 --fail -#" + + error=1 + + curl $DOWNLOAD_OPTS $2 + error=$? + if [ $error != 0 ]; then + error "İndiriliyor '$2' başarısız." + exit $E_DOWNLOAD + fi +} +download_file() { + info "İndiriliyor '$1'." + + LOCAL_FILENAME=`get_filename $1` + + if [ ! "`type -p wget`" ]; then + warning "Command 'wget' not found." + info "You should install 'wget' as soon as possible, trying with curl ..." + downloads_file_with_curl $LOCAL_FILENAME $1 + else + LOCAL_FILENAME_PARTIAL="$LOCAL_FILENAME.partial" + DOWNLOAD_OPTS="--passive-ftp --no-directories --tries=3 --waitretry=3 \ + --directory-prefix=$DERLEME_KAYNAKDIZIN \ + --output-document=$LOCAL_FILENAME_PARTIAL --no-check-certificate" + + if [ -f "$LOCAL_FILENAME_PARTIAL" ]; then + info "Kısmi indirme var,tamamlanmaya çalışılacak" + RESUME_CMD="-c" + fi + + error=1 + + BASENAME=`get_basename $1` + for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do + REPO="`echo $REPO | sed 's|/$||'`" + wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $REPO/$BASENAME + error=$? + if [ $error == 0 ]; then + break + fi + done + + if [ $error != 0 ]; then + while true; do + wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $1 + error=$? + if [ $error != 0 ] && [ "$RESUME_CMD" ]; then + info "Partial download failed, restarting" + rm -f "$LOCAL_FILENAME_PARTIAL" + RESUME_CMD="" + else + break + fi + done + fi + + if [ $error != 0 ]; then + error "İndiriliyor '$1' başarısız." + exit $E_DOWNLOAD + fi + + mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME" + fi +} +download_source() { + local FILE LOCAL_FILENAME + + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + if [ ! -e $LOCAL_FILENAME ]; then + if [ "$LOCAL_FILENAME" = "$FILE" ]; then + error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)." + exit $E_DOWNLOAD + else + if [ "$PKGMK_DOWNLOAD" = "evet" ]; then + download_file $FILE + else + error "Source file '$LOCAL_FILENAME' not found (use option -d to download)." + exit $E_DOWNLOAD + fi + fi + fi + done +} +remove_source() { + local FILE LOCAL_FILENAME + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then + info "Removing $LOCAL_FILENAME" + rm -f $LOCAL_FILENAME + fi + done +} +unpack_source() { + local FILE LOCAL_FILENAME COMMAND + + for FILE in ${source[@]}; do + LOCAL_FILENAME=`get_filename $FILE` + case $LOCAL_FILENAME in + *.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm) + if [ "$PKGMK_IGNORE_UNPACK" != "evet" ];then + COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" + else + COMMAND="cp $LOCAL_FILENAME $SRC" + fi ;; + *) + COMMAND="cp $LOCAL_FILENAME $SRC" ;; + esac + + echo "$COMMAND" + + $COMMAND + + if [ $? != 0 ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + error "'$TARGET' derlenmesi basarisiz." + exit $E_UNPACK + fi + done +} +get_package_list() { + local ARCHFILE i + i=0 + for ARCH in x86_64 i686 any; do + for FILE in `find $PKGMK_PACKAGE_DIR -name "${name}*$ARCH.$PKT_UZANTISI*"`; do + TARGETS[i]=`basename $FILE` + i=$((i+1)) + done + done +} +make_md5sum() { + local FILE LOCAL_FILENAMES + + if [ "$source" ]; then + for FILE in ${source[@]}; do + LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`" + done + + md5sum $LOCAL_FILENAMES | sed -e 's| .*/| |' | sort -k 2 + fi +} + +make_footprint() { +if ! (echo $TARGET| grep "kernel" >/dev/null); then + pkginfo --footprint $TARGET | \ + sed "s|\tlib/modules/`uname -r`/|\tlib/modules//|g" | \ + sort -k 3 +else + pkginfo --footprint $TARGET | sort -k 3 +fi +} + +check_md5sum() { + local FILE="$DERLEME_SANTIYE/.tmp" + + cd $PKGMK_ROOT + + if [ -f $PKGMK_MD5SUM ]; then + make_md5sum > $FILE.md5sum + sort -k 2 $PKGMK_MD5SUM > $FILE.md5sum.orig + diff -w -t -U 0 $FILE.md5sum.orig $FILE.md5sum | \ + sed '/^@@/d' | \ + sed '/^+++/d' | \ + sed '/^---/d' | \ + sed 's/^+/NEW /g' | \ + sed 's/^-/MISSING /g' > $FILE.md5sum.diff + if [ -s $FILE.md5sum.diff ]; then + error "Md5sum mismatch found:" + cat $FILE.md5sum.diff >&2 + + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + error "Md5sum not ok." + exit $E_MD5 + fi + + error "'$TARGET' derleme basarisiz." + exit $E_MD5 + fi + else + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + info "Md5sum not found." + exit $E_MD5 + fi + + warning "Md5sum not found, creating new." + make_md5sum > $PKGMK_MD5SUM + fi + + if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + info "Md5sum ok." + exit 0 + fi +} + +strip_files() { + local FILE FILTER + + cd $PKG + + if [ -f $PKGMK_ROOT/$PKGMK_NOSTRIP ]; then + FILTER="grep -v -f $PKGMK_ROOT/$PKGMK_NOSTRIP" + else + FILTER="cat" + fi + + find . -type f -printf "%P\n" | $FILTER | while read FILE; do + case $(file -b "$FILE") in + *ELF*executable*not\ stripped) + strip --strip-all "$FILE" + ;; + *ELF*shared\ object*not\ stripped) + strip --strip-unneeded "$FILE" + ;; + current\ ar\ archive) + strip --strip-debug "$FILE" + esac + done +} + +compress_manpages() { + local FILE DIR TARGET + + cd $PKG + + find . -type f -path "*/share/man*/*" | while read FILE; do + if [ "$FILE" = "${FILE%%.gz}" ]; then + gzip -9 "$FILE" + fi + done + + find . -type l -path "*/share/man*/*" | while read FILE; do + TARGET=`readlink -n "$FILE"` + TARGET="${TARGET##*/}" + TARGET="${TARGET%%.gz}.gz" + rm -f "$FILE" + FILE="${FILE%%.gz}.gz" + DIR=`dirname "$FILE"` + + if [ -e "$DIR/$TARGET" ]; then + ln -sf "$TARGET" "$FILE" + fi + done + find . -type f -path "*/share/info/*" | while read FILE; do + if [ "$FILE" = "${FILE%%.gz}" ]; then + gzip -9 "$FILE" + fi + done + find . -type l -path "*/share/info/*" | while read FILE; do + TARGET=`readlink -n "$FILE"` + TARGET="${TARGET##*/}" + TARGET="${TARGET%%.gz}.gz" + rm -f "$FILE" + FILE="${FILE%%.gz}.gz" + DIR=`dirname "$FILE"` + + if [ -e "$DIR/$TARGET" ]; then + ln -sf "$TARGET" "$FILE" + fi + done +} + +check_footprint() { + local TARGET FILE="$DERLEME_SANTIYE/.tmp" + + cd $PKGMK_PACKAGE_DIR + if [ -z $TARGETS ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Unable to update footprint" + fi + fi + for TARGET in ${TARGETS[@]}; do + if [ -f $TARGET ]; then + PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint + make_footprint > $FILE.footprint + if [ -f $PKGMK_FOOTPRINT ]; then + sort -k 3 $PKGMK_FOOTPRINT > $FILE.footprint.orig + diff -w -t -U 0 $FILE.footprint.orig $FILE.footprint | \ + sed '/^@@/d' | \ + sed '/^+++/d' | \ + sed '/^---/d' | \ + sed 's/^+/NEW /g' | \ + sed 's/^-/MISSING /g' > $FILE.footprint.diff + if [ -s $FILE.footprint.diff ]; then + if [ "$PKGMK_IGNORE_NEW" = "evet" ]; then + mv $FILE.footprint $PKGMK_FOOTPRINT + warning "Footprint mismatch found:" + else + error "Footprint mismatch found:" + BUILD_SUCCESSFUL="yok" + fi + cat $FILE.footprint.diff >&2 + fi + else + warning "Footprint not found, creating new." + mv $FILE.footprint $PKGMK_FOOTPRINT + fi + else + error "Package '$TARGET' was not found." + BUILD_SUCCESSFUL="yok" + fi + done +} + +make_work_dir() { + export PKG="$DERLEME_SANTIYE/pkg" + export SRC="$DERLEME_SANTIYE/src" + + umask 022 + + cd $PKGMK_ROOT + remove_work_dir + mkdir -p $SRC $PKG + + if [ "$MD5SUM_YOKSAY" = "yok" ]; then + check_md5sum + fi +} + +remove_work_dir() { + rm -rf $DERLEME_SANTIYE +} +pack_lib() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in lib lib64; do + if [ -d $DIR/$SUBDIR/pkgconfig ]; then + mv $DIR/$SUBDIR/pkgconfig $PKG + fi + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + rm -r $DIR/$SUBDIR + j=1 + fi + if [ -d $PKG/pkgconfig ]; then + mkdir $DIR/$SUBDIR + mv $PKG/pkgconfig $DIR/$SUBDIR/pkgconfig + fi + done + done +} +remove_lib() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in lib lib64;do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_devel() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in include lib/pkgconfig; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + rm -r $DIR/$SUBDIR + j=1 + + fi + done + done +} +remove_devel() { + local DIR SUBDIR + for DIR in usr opt/*; do + for SUBDIR in include lib/pkgconfig; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_doc() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in doc gtk-doc; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + j=1 + fi + done + done +} +remove_doc() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in doc gtk-doc; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_man() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in info man; do + if [ -d $DIR/$SUBDIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" + j=1 + fi + done + done +} +remove_man() { + local DIR SUBDIR + for DIR in usr/share opt/*/share; do + for SUBDIR in info man; do + if [ -d $DIR/$SUBDIR ]; then + rm -r $DIR/$SUBDIR + fi + done + done +} +pack_service() { + local DIR="etc/rc.d" + if [ -d $DIR ]; then + bsdtar -r -f \ + $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ + $DIR || BUILD_SUCCESSFUL="yok" + j=1 + fi +} +remove_service() { + local DIR="etc/rc.d" + if [ -d $DIR ]; then + rm -r $DIR + fi +} +add_meta_files() { + local NAME + NAME="`get_package_name $1`" + cd $PKG + if [ -f $PKGMK_ROOT/${NAME}.okubeni ]; then + cp $PKGMK_ROOT/${NAME}.okubeni .README + fi + if [ -f $PKGMK_ROOT/${NAME}.kos-kur ]; then + cp $PKGMK_ROOT/${NAME}.kos-kur .PRE + fi + if [ -f $PKGMK_ROOT/${NAME}.kur-kos ]; then + cp $PKGMK_ROOT/${NAME}.kur-kos .POST + fi + for file in .README .PRE .POST; do + if [ -f $file ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ + $file + rm $file + fi + done +} + +add_meta_to_archive() { + local NAME TAR SIZE_I DESC URL PACK MAINT ARCH + NAME="`get_package_name $1`" + ARCH="`get_package_arch $1`" + + info "$NAME arşivine üstbilgiler ekleniyor." + + TAR="$DERLEME_SANTIYE/tar" + mkdir -p $TAR + cd $TAR + + bsdtar xf $PKGMK_PACKAGE_DIR/$1 + + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + DESC="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + DESC="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + PACK="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + PACK="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + MAINT="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + MAINT="n.a" + fi + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + URL="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" + else + URL="n.a" + fi + SIZE_I="`du -b $PKGMK_PACKAGE_DIR/$1|sed "s/\t/ /"|cut -d " " -f1`" + echo "N$NAME" > .META + echo "D$DESC" >> .META + echo "U$URL" >> .META + echo "M$MAINT" >> .META + echo "P$PACK" >> .META + echo "S$SIZE_I" >> .META + echo "V$version" >> .META + echo "r$release" >> .META + echo "B$PKGMK_BUILDVER" >> .META + echo "a$ARCH" >> .META + # TODO improve the pkginfo --runtimedepfiles functionnality + if [ "$PKGMK_IGNORE_RUNTIMEDEPS" == "yok" ];then + for dep in `pkginfo --runtimedepfiles $TAR|grep -v ^[A-Z]`; do + echo "R$dep" >> .META + done + # We don't want any .devel dependencies here + sed -i '/^R[[a-z0-9]*[-_+]*]*\.devel/d' .META + if [ ! -z $run ] && [ "$NAME" == "$name" ]; then + info "Adding runtime deps to Archive $NAME" + for rd in ${run[@]}; do + if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then + error "Runtime dependencie $rd not found, cannot continue" + clean + exit $E_DEPS; + fi + echo "R$rd`pkginfo -b $rd`" >> .META + done + fi + if [ -f $PKGMK_ROOT/${NAME}.run ]; then + info "Adding runtime deps to Archive $NAME" + for rd in `cat $PKGMK_ROOT/${NAME}.run`; do + if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then + error "Runtime dependencie $rd not found, cannot continue" + clean + exit $E_DEPS; + fi + echo "R$rd`pkginfo -b $rd`" >> .META + done + fi + fi + bsdtar -tf $PKGMK_PACKAGE_DIR/$1 > .MTREE + + rm $PKGMK_PACKAGE_DIR/$1 + + for file in .META .MTREE .README .PRE .POST .INFO; do + if [ -f $file ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ + $file + fi + done + + bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 * + + cd .. + rm -rf $TAR +} + +compress_archive() { + info "$1 sıkıştırılıyor." + case $PKT_SIKISTIRMA_MODU in + lz) lzip -9 $1;; + gz) gzip -9 $1;; + bz2) bzip2 -9 $1;; + xz) xz -z -9 $1;; + esac +} + +derle() { + if [ "$PAKETSIZ_DERLEME" = "evet" ]; then + paketsiz_derle + else + build_package + fi + +} + +paketsiz_derle() { + local BUILD_SUCCESSFUL="yok" + + export PKG="/" + export SRC="$DERLEME_SANTIYE/src" + umask 022 + + cd $PKGMK_ROOT + rm -rf $DERLEME_SANTIYE + mkdir -p $SRC + + info "derleniyor... '$TARGET'" + + if [ "$PKGMK_DOWNLOAD" = "evet" ]; then + download_source + fi + unpack_source + + cd $SRC + (set -e -x ; build) + + +# cd $PKG + + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + + fi + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + if [ "$BUILD_SUCCESSFUL" = "evet" ]; then + info " '$TARGET' derleme basarili" + else + if [ -f $TARGET ]; then + touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null + fi + error " '$TARGET' derleme basarisiz" + exit 1 + fi +} + +build_package() { + # TODO find a better solution for the hardcoded folders + local BUILD_SUCCESSFUL="yok" + if [ "$1" != "$TARGET" ]; then + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + error "$TARGET should be remove" + done + error "Remove the binaries first..." + exit $E_BUILD + fi + fi + + check_file "$TARGET" + make_work_dir + + if [ "$UID" != "0" ]; then + warning "Packages should be built as root." + fi + + info "Building '$TARGET'." + + unpack_source + + cd $SRC + (set -e -x ; build) + + if [ $? = 0 ]; then + if [ "$PKGMK_NO_STRIP" = "yok" ]; then + strip_files + fi + + compress_manpages + + cd $PKG + i=0 + j=0 + for group in ${PAKET_GRUPLAR[@]}; do + BUILD_SUCCESSFUL="evet" + if [ "`type -t ${group}`" == "function" ]; then + (set -e -x ;${group}) + j=1 + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + else + error "Building '$TARGET' failed." + exit $E_BUILD + fi + else + if [ "$1" != "$TARGET" ]; then + if [ -f $PKGMK_PACKAGE_DIR/${name}.${group}#$version-* ]; then + rm $PKGMK_PACKAGE_DIR/${name}.${group}#$version-}* + fi + pack_${group} + fi + remove_${group} + if [ "$BUILD_SUCCESSFUL" == "yok" ]; then + error "Building '$TARGET' failed." + exit $E_BUILD + fi + fi + # Add the meta in each package + if [ $j == 1 ]; then + if [ "$BUILD_SUCCESSFUL" == "yok" ]; then + error "Building '$TARGET' failed." + exit $E_BUILD + fi + j=0 + fi + j=0 + done + #dil desteginin eklenmesi-geri kalanın temizlenmesi + #if [ ! "$PAKET_LOKAL" == "hepsi" ];then + # local lokaldizin + # if [ -d usr/share/locale ];then + # lokaldizin="usr/share/locale" + # fi + # if [ -d opt/*/usr/share/locale ];then + # lokaldizin="opt/*/usr/share/locale" + # fi + # for DIR in `ls $lokaldizin` ; do + # if [[ "$PAKET_LOKAL" == *"$DIR"* ]]; then + # echo $DIR "dil paketi ekleniyor" + # else + # rm -rf $lokaldizin/$DIR + # fi + # done + #fi + + if [ "`ls|wc -l`" != "0" ]; then + bsdtar -r -f $PKGMK_PACKAGE_DIR/${name}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} * + else + error "No files found in $PKG..." + exit $E_BUILD + fi + if [ $? = 0 ]; then + BUILD_SUCCESSFUL="evet" + if [ "$DOSYAIZLEME_YOKSAY" == "evet" ]; then + warning "dosyaizleme pas gecildi." + else + check_footprint + fi + fi + fi + + if [ "$BUILD_SUCCESSFUL" = "evet" ]; then + + if [ "$1" != "$TARGET" ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Paket(ler) bulunamadı..." + exit $E_BUILD + fi + for TARGET in ${TARGETS[@]}; do + + add_meta_files $TARGET + add_meta_to_archive $TARGET + done + else + add_meta_files `basename $TARGET` + add_meta_to_archive `basename $TARGET` + fi + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + remove_work_dir + fi + else + if [ -f $TARGET ]; then + touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null + fi + error "'$TARGET' derlenmesi başarısız." + exit $E_BUILD + fi + + + + + +} + +install_package() { + local COMMAND + get_package_list + if [ -z $TARGETS ]; then + error "kurulacak paket bulunamadı..." + exit $E_INSTALL + fi + for TARGET in ${TARGETS[@]}; do + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then + info "kuruluyor '$TARGET'." + + if [ "$DERLE_KUR" = "install" ]; then + COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" + else + COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" + fi + + cd $PKGMK_ROOT + echo "$COMMAND" + $COMMAND + + + if [ $? = 0 ]; then + info " '$TARGET' basarili sekilde kuruldu." + else + error " '$TARGET' kurulum basarisiz." + exit $E_INSTALL + fi + fi + done +} + +paket_kur() { + local COMMAND + get_package_list + if [ -z $TARGETS ]; then + error "kurulacak paket bulunamadı..." + exit $E_INSTALL + fi + for TARGET in ${TARGETS[@]}; do + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then + info "kuruluyor '$TARGET'." + + #paket_kurulum + + if [ "$PAKET_KURMA" = "evet" ]; then + COMMAND2="echo :::::::::::::::::::::::: $PKGMK_PACKAGE_DIR/$TARGET" + fi + + echo "$COMMAND2" + $COMMAND2 + + if [ "$DERLE_KUR" = "install" ]; then + COMMAND="pkgadd $PKGMK_PACKAGE_DIR/$TARGET" + else + COMMAND="pkgadd -u $PKGMK_PACKAGE_DIR/$TARGET" + fi + + cd $PKGMK_ROOT + echo "$COMMAND" + $COMMAND + + + if [ $? = 0 ]; then + info " '$TARGET' basarili sekilde kuruldu." + else + error " '$TARGET' kurulum basarisiz." + exit $E_INSTALL + fi + fi + done +} + +recursive() { + local ARGS FILE DIR + [ -f $REPO_DOSYASI ] && rm -v $REPO_DOSYASI + + ARGS=`echo "$@" | sed -e "s/--recursive//g" -e "s/-r//g"` + + for FILE in `find $PKGMK_ROOT -name $PKGMK_PKGFILE | sort`; do + DIR="`dirname $FILE`/" + if [ -d $DIR ]; then + info "Entering directory '$DIR'." + (cd $DIR && $PKGMK_COMMAND $ARGS) + info "Leaving directory '$DIR'." + fi + done +} +clean() { + unset TARGETS + get_package_list + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + if [ -f $PKGMK_PACKAGE_DIR/$TARGET ]; then + info "Removing $TARGET" + rm -f $PKGMK_PACKAGE_DIR/$TARGET + fi + done + else + warning "$TARGETS bulunamadı" + fi + find $PKGMK_ROOT -name "*.md5sum" -exec rm -v {} \; 2> /dev/null + find $PKGMK_ROOT -name "*.footprint" -exec rm -v {} \; 2> /dev/null + unset TARGETS +} +update_footprint() { + cd $PKGMK_PACKAGE_DIR + if [ -z $TARGETS ]; then + get_package_list + if [ -z $TARGETS ]; then + error "Package(s) not found(s), unable to update footprint." + exit $E_FOOTPRINT + fi + fi + for TARGET in ${TARGETS[@]}; do + if [ ! -f $TARGET ]; then + error "Unable to update footprint. File '$TARGET' not found." + exit $E_FOOTPRINT + fi + PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint + check_file "$PKGMK_FOOTPRINT" + make_footprint > $PKGMK_FOOTPRINT + touch $TARGET + + info "Footprint updated for $TARGET" + done +} + +build_needed() { + local FILE RESULT + RESULT="evet" + if [ -f $TARGET ]; then + RESULT="yok" + FILE=`get_filename $PKGMK_PKGFILE` + if [ ! -e $FILE ] || [ ! $TARGET -nt $FILE ]; then + RESULT="evet" + break + fi + fi + echo $RESULT +} + +update_collection_repo() +{ + local HEAD BUILD_DATE RELEASE DESCRIPTION URL MAINTAINER PACKAGER EXTENSION + if [ -f $REPO_DOSYASI ]; then + HEAD=`head -1 $REPO_DOSYASI` + if [ "${HEAD:10:1}" = "#" ]; then + BUILD_DATE="`echo $HEAD|cut -d "#" -f1`" + EXTENSION="`echo $HEAD|cut -d "#" -f2`" + VERSION="`echo $HEAD|cut -d "#" -f3`" + RELEASE="`echo $HEAD|cut -d "#" -f4`" + DESCRIPTION="`echo $HEAD|cut -d "#" -f5`" + URL="`echo $HEAD|cut -d "#" -f6`" + MAINTAINER="`echo $HEAD|cut -d "#" -f7`" + PACKAGER="`echo $HEAD|cut -d "#" -f8`" + [ -f ../$REPO_DOSYASI ] && sed -i "/#$name#/d" ../$REPO_DOSYASI + echo "`md5sum $REPO_DOSYASI|cut -d " " -f1`#$BUILD_DATE#$name##$version-#$RELEASE#$DESCRIPTION#$URL#$MAINTAINER#$PACKAGER#$EXTENSION" \ + >> ../$REPO_DOSYASI + fi + fi +} +update_repo() +{ + local FILE MD5SUM EXT + cd $PKGMK_ROOT + get_package_list + if [ ! -z $TARGETS ]; then + EXT="`get_package_extension $TARGETS`" + echo -n "`get_package_builddate $TARGETS`#$EXT##$version-#$release" > $REPO_DOSYASI + for string in desc url maint pack; do + if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then + echo -n "#"`cat $PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`"" \ + >> .PKGREPO + else + echo -n "#n.a" >> .PKGREPO + fi + done + printf "\n" >> .PKGREPO + for TARGET in ${TARGETS[@]}; do + FILE=`basename $TARGET` + MD5SUM=`md5sum $TARGET|cut -d " " -f1` + echo "$MD5SUM#`get_package_name $TARGET`#`get_package_arch $TARGET|sed "s/-//"`" >> $REPO_DOSYASI + done + for FILE in ${name}* + do + [ ! -f "$FILE" ] && break + if [ "${FILE:$((${#FILE} - ${#EXT} ))}" != "$EXT" ]; then + echo "`md5sum $FILE|cut -d " " -f1`#$FILE" >> $REPO_DOSYASI + fi + done + else + rm -f $REPO_DOSYASI + fi + echo "`md5sum $PKGMK_PKGFILE|cut -d " " -f1`#$PKGMK_PKGFILE" >> $REPO_DOSYASI +} +clean_repo_files() +{ + cd $PKGMK_ROOT + if [ -f $REPO_DOSYASI ]; then + rm $REPO_DOSYASI + info "siliniyor $REPO_DOSYASI" + fi + if [ -f MD5SUM ]; then + rm MD5SUM + info "siliniyor MD5SUM" + fi +} +interrupted() { + echo "" + error "Interrupted." + + if [ "$PKGMK_KEEP_WORK" = "yok" ]; then + rm -rf $DERLEME_SANTIYE + fi + + exit $E_GENERAL +} + +print_help() { + echo "usage: `basename $PKGMK_COMMAND` [options]" + echo "options:" + echo " -i, --install build and install packages" + echo " -u, --upgrade build and install packages (as upgrade)" + echo " -r, --recursive search for and build packages recursively" + echo " -d, --download download missing source file(s)" + echo " -cv, --show-version-only do not build, only show the version of the port and exit" + echo " -do, --download-only do not build, only download missing source file(s)" + echo " -eo, --extract-only do not build, only extract source file(s)" + echo " -utd, --up-to-date do not build, only check if package is up to date" + echo " -ur, --update-repo do not build, only update the $REPO_DOSYASI file" + echo " -uc, --update-collection do not build, only update the $REPO_DOSYASI file of the collection means from the parent directory" + echo " -uf, --update-footprint update footprint using result from last build" + echo " -ic, --ignore-collection build packages without update the $REPO_DOSYASI file of the collection means from the parent directory" + echo " -if, --ignore-footprint build packages without checking footprint" + echo " -in, --ignore-new build packages, ignore new files in a footprint missmatch" + echo " -um, --update-md5sum update md5sum" + echo " -im, --ignore-md5sum build packages without checking md5sum" + echo " -cm, --check-md5sum do not build, only check md5sum" + echo " -ns, --no-strip do not strip executable binaries or libraries" + echo " -f, --force build packages even if it appears to be up to date" + echo " -co, --clean-only do not build, only remove packages and downloaded files, update $REPO_DOSYASI file" + echo " -kw, --keep-work keep temporary working directory" + echo " -cf, --config-file use alternative configuration file" + echo " -v, --version print version and exit " + echo " -h, --help print help and exit" +} +parse_options() { + while [ "$1" ]; do + case $1 in + -i|--install) + DERLE_KUR="install" ;; + -pk|--pkur) + PAKET_KURMA="evet" ;; + -u|--upgrade) + DERLE_KUR="upgrade" ;; + -r|--recursive) + PKGMK_RECURSIVE="evet" ;; + -d|--download) + PKGMK_DOWNLOAD="evet" ;; + -do|--download-only) + PKGMK_DOWNLOAD="evet" + PKGMK_DOWNLOAD_ONLY="evet" ;; + -eo|--extract-only) + PKGMK_EXTRACT_ONLY="evet" ;; + -cv|--show-version-only) + PKGMK_SHOW_VERSION="evet";; + -utd|--up-to-date) + PKGMK_UP_TO_DATE="evet" ;; + -sk|--sd-kontrol) + SOZDIZIM_KONTROL="evet" ;; + -uc|--update-collection) + PKGMK_UPDATE_COLLECTION="evet";; + -ur|--update-repo) + PKGMK_UPDATE_REPO="evet" ;; + -uf|--update-footprint) + PKGMK_UPDATE_FOOTPRINT="evet" ;; + -if|--ignore-footprint) + DOSYAIZLEME_YOKSAY="evet" ;; + -in|--ignore-new) + PKGMK_IGNORE_NEW="evet" ;; + -um|--update-md5sum) + PKGMK_UPDATE_MD5SUM="evet" ;; + -im|--ignore-md5sum) + MD5SUM_YOKSAY="evet" ;; + -ic|--ignore-collection) + KOLEKSIYON_YOKSAY="evet" ;; + -ir|--ignore-repo) + REPO_YOKSAY="evet" ;; + -cm|--check-md5sum) + PKGMK_CHECK_MD5SUM="evet" ;; + -ns|--no-strip) + PKGMK_NO_STRIP="evet" ;; + -f|--force) + PKGMK_FORCE="evet" ;; + -co|--clean-only) + PKGMK_CLEAN_ONLY="evet" ;; + -kw|--keep-work) + PKGMK_KEEP_WORK="evet" ;; + -cf|--config-file) + if [ ! "$2" ]; then + echo "`basename $PKGMK_COMMAND`: option $1 requires an argument" + exit 1 + fi + DERLEME_AYARDOSYASI="$2" + shift ;; + -v|--version) + echo "`basename $PKGMK_COMMAND` (cards) $PKGMK_VERSION" + exit 0 ;; + -h|--help) + print_help + exit 0 ;; + *) + echo "`basename $PKGMK_COMMAND`: invalid option $1" + exit 1 ;; + esac + shift + done +} + +main() { + if [ -f /etc/noprofile ]; then + source /etc/noprofile + fi + + parse_options "$@" + + if [ ! -f $DERLEME_AYARDOSYASI ]; then + error "File '$DERLEME_AYARDOSYASI' not found." + exit $E_GENERAL + fi + . $DERLEME_AYARDOSYASI + PKGMK_ARCH=`uname -m` + + + + #if ! (`which pkginfo > /dev/null`); then + #warning "pkginfo NOT FOUND, footprint ignored." + DOSYAIZLEME_YOKSAY="evet" + #fi + local FILE TARGET + + name=`basename $PKGMK_ROOT` + + if [ "$PKGMK_RECURSIVE" = "evet" ]; then + recursive "$@" + exit 0 + fi + if [ ! -f $PKGMK_PKGFILE ]; then + error "File '$PKGMK_PKGFILE' not found." + exit $E_TALIMAT + fi + . $PKGMK_PKGFILE + + if [ -z $group ]; then + group="`echo $name | cut -d "-" -f1`" + fi + if [ "$group" == "$name" ]; then + unset group + fi + if [ -z "$version" ]; then + if [ ! -z "$group" ];then + if [ -f ../$group/$PKGMK_PKGFILE ];then + . ../$group/$PKGMK_PKGFILE + unset run + . $PKGMK_PKGFILE + else + warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." + fi + else + warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." + fi + fi + if [ "$PKGMK_SHOW_VERSION" == "evet" ]; then + echo "$version" + exit 0 + fi + info "DERLE_KUR: $DERLE_KUR" + info "PAKET_KURMA: $PAKET_KURMA" + info "DERLEME_SANTIYE: $DERLEME_SANTIYE" + info "DERLEME_KAYNAKDIZIN: $DERLEME_KAYNAKDIZIN" + + if [ "$DERLE_KUR" = "yok" ]; then + PKGMK_CLEAN="yok" + warning "TEMIZLIK PAS GECILDI." + else + info "PKGMK_KEEP_SOURCES: $PKGMK_KEEP_SOURCES" + info "PKGMK_CLEAN: $PKGMK_CLEAN" + fi + if [ "$PKGMK_CLEAN" != "yok" ]; then + DOSYAIZLEME_YOKSAY="evet" + MD5SUM_YOKSAY="evet" + warning "FOOTPRINT AND MD5SUM IGNORED" + else + if [ "$PKGMK_UPDATE_REPO" != "evet" ]; then + info "REPO_YOKSAY: $REPO_YOKSAY" + else + info "PKGMK_UPDATE_REPO: $PKGMK_UPDATE_REPO" + fi + info "DOSYAIZLEME_YOKSAY: $DOSYAIZLEME_YOKSAY" + info "MD5SUM_YOKSAY: $MD5SUM_YOKSAY" + fi + if [ "$REPO_YOKSAY" == "evet" ]; then + info "$REPO_DOSYASI dosyası silenecek" + fi + + info "PKT_SIKISTIRMA: $PKT_SIKISTIRMA" + if [ "$PKT_SIKISTIRMA" != "yok" ]; then + info "PKT_SIKISTIRMA_MODU: $PKT_SIKISTIRMA_MODU" + fi + + info "isim: ${name}" + if [ ! -z "$version" ]; then + info "versiyon: $version" + fi + if [ ! -z "$release" ]; then + info "surum: $release" + fi + if [ ! -z "$group" ]; then + info "grup: $group" + fi + PKGMK_MD5SUM="$name.`uname -m`.md5sum" + check_directory "$DERLEME_KAYNAKDIZIN" + check_directory "$PKGMK_PACKAGE_DIR" + check_directory "`dirname $DERLEME_SANTIYE`" + + check_pkgfile + + get_package_list + + case $PKT_SIKISTIRMA_MODU in + lz|gz|bz2|xz) + if [ -z $TARGETS ]; then + TARGET="$PKGMK_PACKAGE_DIR/${name}#$version-PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" + fi;; + *) + error "Sıkıstırma modu '$PKT_SIKISTIRMA_MODU' desteklenmiyor" + exit $E_GENERAL + ;; + esac + case $PKT_SIKISTIRMA_MODU in + gz) COMPRESSION="-z" ;; + bz2) export COMPRESSION="-j" ;; + xz) export COMPRESSION="-J" ;; + esac + + if [ "$PKGMK_CLEAN_ONLY" = "evet" ]; then + clean + remove_source + update_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_COLLECTION" = "evet" ]; then + update_collection_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_REPO" = "evet" ]; then + update_repo + exit 0 + fi + if [ "$PKGMK_UPDATE_FOOTPRINT" = "evet" ]; then + update_footprint + exit 0 + fi + + if [ "$SOZDIZIM_KONTROL" = "evet" ]; then + update_collection_repo + info "description: $description" + info "url: $url" + info "packager: $packager" + info "maintainer: $maintainer" + exit 0 + fi + + if [ "$PKGMK_UPDATE_MD5SUM" = "evet" ]; then + download_source + check_file "$PKGMK_MD5SUM" + make_md5sum > $PKGMK_MD5SUM + info "Md5sum updated." + exit 0 + fi + + if [ "$PKGMK_DOWNLOAD_ONLY" = "evet" ]; then + download_source + exit 0 + fi + + if [ "$PKGMK_EXTRACT_ONLY" = "evet" ]; then + download_source + make_work_dir + info "Extracting sources of package '${name}-$version'." + unpack_source + exit 0 + fi + + if [ "$PKGMK_UP_TO_DATE" = "evet" ]; then + if [ ! -z $TARGETS ]; then + for TARGET in ${TARGETS[@]}; do + if [ "`build_needed`" = "evet" ]; then + info "Package '$TARGET' is not up to date." + else + info "Package '$TARGET' is up to date." + fi + done + else + if [ "`build_needed`" = "evet" ]; then + info "Package '$TARGET' is not up to date." + else + info "Package '$TARGET' is up to date." + fi + fi + exit 0 + + fi + # From here on it's need to check the base package not any group which means + if [ -z $TARGETS ]; then + TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU + if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then + info "Package '$TARGET' is up to date." + else + download_source + derle + fi + else + FOUND=false + for TARGET in ${TARGETS[@]}; do + if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then + if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ]; then + FOUND=true + fi + info "Package '$TARGET' is up to date." + else + download_source + derle + break + fi + done + fi + if [ ! -z $FOUND ] ; then + if [ $FOUND != true ]; then + download_source + PKGMK_BUILDVER="`get_package_builddate $TARGET`" + TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI + derle $TARGET + fi + fi + if [ "$DERLE_KUR" != "yok" ]; then + install_package + fi + if [ "$PKT_SIKISTIRMA" = "evet" ]; then + cd $PKGMK_PACKAGE_DIR + get_package_list + for TARGET in ${TARGETS[@]}; do + if [ "${TARGET:$((${#TARGET} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then + compress_archive $TARGET + fi + done + fi + if [ "$PKGMK_KEEP_SOURCES" != "evet" ]; then + remove_source + fi + if [ "$PKGMK_CLEAN" != "yok" ]; then + clean + unset TARGETS + if [ "$REPO_YOKSAY" == "evet" ];then + clean_repo_files + fi + fi + if [ "$REPO_YOKSAY" != "evet" ] && [ "$PKGMK_CLEAN" != "evet" ]; then + update_repo + fi + if [ "$KOLEKSIYON_YOKSAY" != "evet" ]; then + update_collection_repo + fi + exit 0 +} + +trap "interrupted" SIGHUP SIGINT SIGQUIT SIGTERM + +export LC_ALL=POSIX +DERLEME_AYARDOSYASI="/etc/mpsd.conf" +readonly PKGMK_VERSION="1.0" +readonly PKGMK_COMMAND="$0" +readonly PKGMK_ROOT="$PWD" +PKGMK_PACKAGE_DIR="$PWD" + +PKGMK_BUILDVER=`date +%s` +#PKGMK_BUILDVER="#" + +PKT_UZANTISI="mps" + +REPO_DOSYASI=".PKGREPO" + + +PKGMK_PKGFILE="talimat" +PKGMK_MD5SUM="$name.`uname -m`.md5sum" +PKGMK_NOSTRIP=".nostrip" + +PKGMK_KEEP_SOURCES="yok" +PKGMK_CLEAN="evet" +PAKET_KURMA="evet" + +PAKET_GRUPLAR=() +PAKET_LOKAL="tr" + +PKGMK_SOURCE_MIRRORS=() +DERLEME_KAYNAKDIZIN="$PWD" +DERLEME_SANTIYE="$PWD/work" +PKGMK_DOWNLOAD="yok" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_IGNORE_NEW="evet" +MD5SUM_YOKSAY="evet" +SURUM_YOKSAY="yok" +REPO_YOKSAY="evet" +KOLEKSIYON_YOKSAY="evet" +PKGMK_IGNORE_RUNTIMEDEPS="evet" + +PKGMK_NO_STRIP="yok" + +PKT_SIKISTIRMA_MODU="lz" + +PKT_SIKISTIRMA="yok" + +DERLE_KUR="yok" +PKGMK_RECURSIVE="yok" + +PKGMK_DOWNLOAD_ONLY="yok" +PKGMK_EXTRACT_ONLY="yok" +PKGMK_IGNORE_UNPACK="yok" +PKGMK_UP_TO_DATE="yok" +PKGMK_UPDATE_FOOTPRINT="yok" +PKGMK_FORCE="yok" +PKGMK_KEEP_WORK="yok" + +PKGMK_UPDATE_MD5SUM="yok" +PKGMK_CHECK_MD5SUM="yok" + +main "$@" + +# End of file diff --git a/mps-0.8/mpsd.conf b/mps-0.8/mpsd.conf new file mode 100644 index 000000000..3b3f508bd --- /dev/null +++ b/mps-0.8/mpsd.conf @@ -0,0 +1,31 @@ +export CFLAGS="-O2 -pipe" +export CXXFLAGS="${CFLAGS}" + +case "`uname -m`" in + "x86_64"|"") + export MAKEFLAGS="-j5" + ;; + "i686") + export MAKEFLAGS="-j2" + export CFLAGS="${CFLAGS} -m32" + export CXXFLAGS="${CXXFLAGS} -m32" + export LDFLAGS="${LDFLAGS} -m32" + ;; + *) + echo "bilinmeyen mimari..cıkılıyor." + exit 1 + ;; +esac +DERLEME_SANTIYE="/tmp/work" +DERLEME_KAYNAKDIZIN="/sources" +PKGMK_SYNC_FILES="yok" +PKT_SIKISTIRMA="evet" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_UPDATE_INDEX="evet" +PKGMK_KEEP_SOURCES="evet" +MD5SUM_YOKSAY="evet" +PKGMK_CLEAN="yok" +PAKET_GRUPLAR=() +PAKET_LOKAL="tr" +KOLEKSIYON_YOKSAY="yok" +SURUM_YOKSAY="yok" diff --git a/mps-0.8/onmpsd.conf b/mps-0.8/onmpsd.conf new file mode 100644 index 000000000..82856d62e --- /dev/null +++ b/mps-0.8/onmpsd.conf @@ -0,0 +1,32 @@ +export CFLAGS="-O2 -pipe" +export CXXFLAGS="${CFLAGS}" + +case "`uname -m`" in + "x86_64"|"") + export MAKEFLAGS="-j5" + ;; + "i686") + export MAKEFLAGS="-j2" + export CFLAGS="${CFLAGS} -m32" + export CXXFLAGS="${CXXFLAGS} -m32" + export LDFLAGS="${LDFLAGS} -m32" + ;; + *) + echo "bilinmeyen mimari..cıkılıyor." + exit 1 + ;; +esac +DERLEME_SANTIYE="/tmp/work" +DERLEME_KAYNAKDIZIN="/sources" +PKGMK_SYNC_FILES="yok" +PKT_SIKISTIRMA="evet" +DOSYAIZLEME_YOKSAY="evet" +PKGMK_UPDATE_INDEX="evet" +PKGMK_KEEP_SOURCES="evet" +MD5SUM_YOKSAY="evet" +PKGMK_CLEAN="yok" +PAKET_GRUPLAR=(devel service) +PAKET_LOKAL="tr" +KOLEKSIYON_YOKSAY="yok" +SURUM_YOKSAY="evet" +PAKETSIZ_DERLEME="evet" From 3c4d921aaabbef38f94fb404ef6f0ae0781ead00 Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 8 Feb 2017 12:10:23 +0000 Subject: [PATCH 17/20] mate-ayarlari --- mps-0.8/fonks.sh | 244 ------- mps-0.8/mps | 1301 ------------------------------------ mps-0.8/mpsd | 1540 ------------------------------------------- mps-0.8/mpsd.conf | 31 - mps-0.8/onmpsd.conf | 32 - 5 files changed, 3148 deletions(-) delete mode 100644 mps-0.8/fonks.sh delete mode 100755 mps-0.8/mps delete mode 100755 mps-0.8/mpsd delete mode 100644 mps-0.8/mpsd.conf delete mode 100644 mps-0.8/onmpsd.conf diff --git a/mps-0.8/fonks.sh b/mps-0.8/fonks.sh deleted file mode 100644 index 4c60ef0e8..000000000 --- a/mps-0.8/fonks.sh +++ /dev/null @@ -1,244 +0,0 @@ -#!/bin/sh - -. /usr/bin/gettext.sh -alias sed="busybox sed" - -# Internal -lgettext() { gettext -d 'x' "$@"; } -translate_query() { - case $1 in - y) lgettext "y";; - Y) lgettext "Y";; - n) lgettext "n";; - N) lgettext "N";; - # Support other cases but keep them untranslated. - *) echo "$1" ;; - esac -} -okmsg="$(lgettext 'Done')" -ermsg="$(lgettext 'Failed')" -: ${okcolor=32} -: ${ercolor=31} -: ${decolor=36} - -# Parse cmdline options and store values in a variable. -for opt in "$@"; do - opt_name="${opt%%=*}"; opt_name="$(echo -n "${opt_name#--}" | tr -c 'a-zA-Z0-9' '_')" - case "$opt" in - --[0-9]*=*) export _$opt_name="${opt#*=}" ;; - --[0-9]*) export _$opt_name=yes ;; - --*=*) export $opt_name="${opt#*=}" ;; - --*) export $opt_name=yes ;; - esac -done -[ "$HTTP_REFERER" ] && output='html' - - - - -# i18n functions -_() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; echo; } -_n() { local T="$1"; shift; printf "$(eval_gettext "$T")" "$@"; } -_p() { local S="$1" P="$2" N="$3"; shift 3; printf "$(ngettext "$S" "$P" "$N")" "$@"; } - -# Get terminal columns -get_cols() { stty size 2>/dev/null | awk -vc=$cols 'END{print c?c:($2 && $2<80)?$2:80}'; } - -# Last command status -status() { - local ret_code=$? - [ -n "$quiet" -a "$ret_code" -eq 0 ] && return - [ -n "$quiet" ] && action "$saved_action" no-quiet - - case $ret_code in - 0) local msg="$okmsg" color="$okcolor";; - *) local msg="$ermsg" color="$ercolor";; - esac - case $output in - raw|gtk) echo " $msg";; - html) echo " $msg";; - *) echo -e "[ \\033[1;${color}m$msg\\033[0;39m ]";; - esac -} - -# Line separator -separator() { - [ -n "$quiet" ] && return - case $output in - gtk) echo '--------';; - html) echo -n '
';; - *) printf "%$(get_cols)s\n" | tr ' ' "${1:-=}";; - esac -} - -# New line -newline() { - [ -z "$quiet" ] && echo -} - -# Display a bold message -boldify() { - [ -n "$quiet" ] && return - case $output in - raw) echo "$@" ;; - gtk) echo "$@" ;; - html) echo "$@" ;; - *) echo -e "\\033[1m$@\\033[0m" ;; - esac -} - -# renkli mesaj -ryaz() { - [ -n "$quiet" ] && return - : ${color=$1} - shift - case $output in - raw|gtk) echo "$@";; - html) echo -n "$@";; - *) case $color in - 0*) echo -e "\\033[${color:-38}m$@\\033[39m";; - *) echo -e "\\033[1;${color:-38}m$@\\033[0;39m";; - esac;; - esac - unset color -} - -# Indent text -indent() { - [ -n "$quiet" ] && return - local in="$1" - shift - echo -e "\033["$in"G $@"; -} - -# Extended MeSsaGe output -emsg() { - [ -n "$quiet" ] && return - local sep="\n$(separator)\n" - case $output in - raw) - echo "$@" | sed -e 's|||g; s|||g; s|||g; \ - s|||g; s|<->|'$sep'|g; s||\n|g; s|| |g' ;; - gtk) - echo "$@" | sed -e 's|||g; s|||g; s|<->|'$sep'|g; \ - s||\n|g; s|| |g' ;; - html) - echo "$@" | sed -e 's|||g; s|||g; \ - s|||g; s|||g; \ - s||
|g; s|<->|
|g; s|| |g' ;; - *) - echo -en "$(echo "$@" | sed -e 's||\\033[1m|g; s||\\033[0m|g; - s||\\033[\1m|g; s||\\033[1;\1m|g; - s||\\033[0;39m|g; s||\n|g; - s|<->|'$sep'|g; s||\\033[\1G|g')" - [ "$1" != "-n" ] && echo - ;; - esac -} - -# Check if user is logged as root -check_root() { - if [ $(id -u) -ne 0 ]; then - lgettext "You must be root to execute:"; echo " $(basename $0) $@" - exit 1 - fi -} - -# Display debug info when --debug is used. -debug() { - [ -n "$debug" ] && echo "$(colorize $decolor 'DEBUG:') $1" -} - -# Confirmation -confirm() { - if [ -n "$yes" ]; then - true - else - if [ -n "$1" ]; then - echo -n "$1 " - else - echo -n " ($(translate_query y)/$(translate_query N)) ? " - fi - read answer - [ "$answer" == "$(translate_query y)" ] - fi -} - -# Log islemleri -log() { - echo "$(date '+%F %R') : $@" >> ${faaliyet:-/var/log/islem.log} -} - -# Print two-column list of options with descriptions -optlist() { - [ -n "$quiet" ] && return - local in="$(echo "$1" | sed 's| *| |g')" w=$(get_cols) col1=1 line - IFS=$'\n' - for line in $in; do - col=$(echo -n "$line" | cut -f1 | wc -m) - [ $col -gt $col1 ] && col1=$col - done - echo "$in" | sed 's|\t|&\n|' | fold -sw$((w - col1 - 4)) | \ - sed "/\t/!{s|^.*$|[$((col1 + 4))G&|g}" | sed "/\t$/{N;s|.*| &|;s|\t\n||}" -} - -# Wrap words in long terminal message -longline() { - [ -n "$quiet" ] && return - local w=$(get_cols) - echo -e "$@" | fold -sw$w -} - -# Print localized title -title() { - [ -n "$quiet" ] && return - case $output in - html) echo "
$(_ "$@")
";;
-		*) newline; boldify "$(_ "$@")"; separator;;
-	esac
-}
-
-# Print footer
-footer() {
-	[ -n "$quiet" ] && return
-	case $output in
-		html) echo "
$1
";; - *) separator; echo "$1"; [ -n "$1" ] && newline;; - esac -} - -# Print current action -saved_action='' -action() { - saved_action="$1" - [ -n "$quiet" -a -z "$2" ] && return - local w c scol msg chars - w=$(_ 'w'); w=${w/w/10} - c=$(get_cols) - scol=$(( $c - $w )) - msg="$(_n "$@" | fold -sw$scol)" - chars=$(echo -n "$msg" | tail -n1 | wc -m) - msg="$(printf '%s%'$(( $scol - $chars ))'s' "$msg" '')" - - case $output in - raw|gtk|html) echo -n "$msg";; - *) echo -ne "\033[0;33m$msg\033[0m";; - esac -} - -# Print long line as list item -itemize() { - [ -n "$quiet" ] && return - case $output in - gtk) echo "$@";; - *) - local inp="$@" w=$(get_cols) first offset - first="$(echo -e "$inp" | fold -sw$w | head -n1)" - echo "$first" - cols1="$(echo "${first:1}" | wc -c)" - offset=$(echo "$first" | sed -n 's|^\([^:\*-]*[:\*-]\).*$|\1|p' | wc -m) - echo "${inp:$cols1}" | fold -sw$((w - offset)) | awk \ - '($0){printf "%'$offset's%s\n","",$0}' - ;; - esac -} diff --git a/mps-0.8/mps b/mps-0.8/mps deleted file mode 100755 index 14ed6b647..000000000 --- a/mps-0.8/mps +++ /dev/null @@ -1,1301 +0,0 @@ -#!/bin/bash -. /etc/mpsd.conf -if [ -f /etc/mps.conf ];then -. /etc/mps.conf -fi -. /root/bin/fonks.sh -versiyon="0.8.6" -iletisim="milisarge@gmail.com" -paketdepo="/depo/paketler/" -if [ -z ${sunucu+:} ]; then - sunucu="127.0.0.1:8000/" -fi -#sunucu="http://milis.gungre.ch/packages/" -git_sunucu="https://github.com/milisarge/malfs-milis" -ikaynak="" -betikad=${0##*/} -kurulum_onay="evet" -talimatname_dizin="/root/talimatname" -kokdizin="/" -VT="/var/lib/pkg/DB" -TARIHCE_DIZIN="/var/lib/pkg/tarihce" -LOGDIZIN="/var/log/mps" -tekrarkur="hayir" -#temel paket koruma -tpk="evet" -if [ -z ${lokal+:} ]; then - lokal="tr" -fi -if [ -z ${docsil+:} ]; then - docsil="evet" -fi -if [ -z ${yerelsil+:} ]; then - yerelsil="evet" -fi - - -icerik_ekle(){ - paketad=`echo "$1" | cut -d'#' -f1` - paketad=`basename $paketad` - ryaz 34 $paketad" paketi kuruluyor-> $kokdizin" - tar -C /tmp --extract --file=$1 .PRE 1 2> /tmp/$paketad_pre.log - #kos-kur kontrolu - if [ -f /tmp/.PRE ];then - if [ "$kokdizin" == "/" ];then - bash /tmp/.PRE - else - cp /tmp/.PRE $kokdizin/tmp/$paketad.PRE - fi - rm /tmp/.PRE - fi - mkdir -p kur.$paketad && - tar xf $1 -C kur.$paketad && - #istenmeyen yerellerin silinmesi - if [ -d kur.$paketad/usr/share/locale ] && [ "$yerelsil" == "evet" ];then - for lkl in `ls kur.$paketad/usr/share/locale/`;do - if [ "$lkl" != "$lokal" ];then rm -r kur.$paketad/usr/share/locale/$lkl; fi - done - fi - #doc dizini silinmesi - if [ -d kur.$paketad/usr/share/doc ] && [ "$docsil" == "evet" ];then - rm -r kur.$paketad/usr/share/doc - fi - mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" && - cp -v -afr kur.$paketad/* $kokdizin > kur.$paketad/kurulan - cp kur.$paketad/kurulan /tmp/ &&cat kur.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan && - #mv kur.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files && - mv kur.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META && - - #kur-kos calistirilmasi - if [ -f kur.$paketad/.POST ];then - if [ "$kokdizin" == "/" ];then - bash kur.$paketad/.POST - else - cp kur.$paketad/.POST $kokdizin/tmp/$paketad.POST - fi - rm kur.$paketad/.POST - fi - - rm -r kur.$paketad - if [ -f $kokdizin/etc/ld.so.conf ];then - ldconfig -r $kokdizin - fi - ryaz 34 $paketad" paketi kuruldu." - loglama "$paketad paketi kuruldu." - -} - -paket_sil(){ - local paket kkont sil_onay oto_silme - paket="$1" - if [ "$2" ]; then - oto_silme="$2" - fi - if [ "$tpk" = "evet" ] && [ -d "$talimatname_dizin/temel/$1" ];then - ryaz 31 "$1 temel sistem paketidir.Silinemez!!!" - else - kkont=`kurulu_kontrol "$1"` - if [ "$kkont" = "kurulu" ];then - if [ -f "/var/lib/pkg/DB/$paket/kurulan" ];then - #dizin koruma - kurban_kurtar $1 - cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil - ryaz 31 "ters bagimliliklar" - ryaz 31 "------------------" - ters_bagimli_kontrol "$paket" - ryaz 31 "------------------" - ryaz 31 "kurban dosyalar" - ryaz 31 "------------------" - silme_kurban_kontrol /tmp/$paket.sil - ryaz 31 "------------------" - if [ "$oto_silme" = "evet" ];then - sil_onay="e" - else - while true; do - ryaz 34 $paket" paketi kaldırılsın mı?";read -p "e veya h-> " eh - case $eh in - [Ee]* ) sil_onay="e"; break;; - [Hh]* ) break;; - * ) echo "e veya h";; - esac - done - fi - if [ "$sil_onay" = "e" ];then - xargs rm -r -f < /tmp/$paket.sil && - rm -r -f /var/lib/pkg/DB/"$paket" && - ryaz 34 $paket" paketi silindi." - loglama "$paket paketi silindi." - rm -f /tmp/$paket.sil - else - rm -f /tmp/$paket.sil - exit 1 - fi - - else - ryaz 31 "kritik mesaj:kurulanlar dosyası yok." - fi - else - ryaz 32 "paket zaten kurulu değil!" - fi - fi - -} -paket_ara(){ - paket="$1" - for pkt in `cat /depo/paketler/paket.vt | grep $paket | awk '{print $1}'`; do - pakdesc=$(find /root/talimatname -name "$pkt" | xargs -I % sed -n '1{p;q}' %/talimat | sed s'/# Description: //g'); - ryaz 34 "$pkt - $pakdesc"; - done -} -kelime_bul(){ - grep --color -H -ri "$1" /root/talimatname/ -} -paket_bilgi2(){ - local paket kkont - kkont=`kurulu_kontrol "$1"` - if [ "$kkont" = "kurulu" ];then - paket="$1" - cat /var/lib/pkg/DB/"$paket"/META - else - echo "paket kurulu değil!" - fi - -} - -paket_bilgi(){ - local paket kkont - kkont=`kurulu_kontrol "$1"` - if [ "$kkont" = "kurulu" ];then - paket="$1" - satir=`sed -n '1p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "AD:" ${satir:1:${#satir}-1} - satir=`sed -n '2p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "TN:" ${satir:1:${#satir}-1} - satir=`sed -n '3p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "UR:" ${satir:1:${#satir}-1} - satir=`sed -n '4p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "YP:" ${satir:1:${#satir}-1} - satir=`sed -n '5p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "PK:" ${satir:1:${#satir}-1} - satir=`sed -n '6p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "--:" ${satir:1:${#satir}-1} - satir=`sed -n '7p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "VS:" ${satir:1:${#satir}-1} - satir=`sed -n '8p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "RL:" ${satir:1:${#satir}-1} - satir=`sed -n '9p' < /var/lib/pkg/DB/"$paket"/META` - ryaz 32 "DZ:" `date -d @${satir:1:${#satir}-1}` - else - echo "paket kurulu değil!" - fi - -} - -yeniden_paketle(){ - cd $1 - bsdtar -r -f ../"$1".mps .META - bsdtar -r -f ../"$1".mps * - cd .. - lzip -9 "$1".mps -} - -derleme_listyap(){ - bagimlist=`bagimlilar "$1"` - - if [ "$bagimlist" != "talimatyok" ];then - for bagim in $bagimlist;do - - if [ "`cat tumbag.liste | grep $bagim`" != "$bagim" ];then - derleme_listyap "$bagim" - fi - - done - - if ! grep -Fxq "$1" tumbag.liste - then - ana="`find $talimatname_dizin -name $1`" - echo ${ana#"$talimatname_dizin"} - #sadece genel bagimliliklar derlenecek - echo "$1" >> tumbag.liste - if [ -d "$talimatname_dizin/genel/$1" ];then - echo "$1" >> bag.liste - fi - fi - else - ryaz 31 "$1 talimatı bulunamadı." - exit 1 - fi -} - -derleme_listbilgi(){ - ryaz 34 "yapim asamasında" -} - -paket_derle_liste(){ - for dpkt in `cat $1`;do - echo $dpkt "derleniyor...." - zorla_derle="yok" - paket_derle $dpkt - done -} -#otomatik derle kontrollu kur -paket_derle_kur(){ - tekrarkur="hayir" - mps -dly "$1" && mps -derlist bag.liste -} - -paket_kur_oto(){ - local kpkt pkt pak kliste - if [ "$1" = "-H" ];then - ls *.mps.lz > "otokur.list" - kliste="otokur.list" - else - kliste="$1" - fi - for kpkt in `cat $kliste`;do - for pkt in `ls $kpkt* | cut -d'#' -f1`;do - pak=`ls "$pkt#"*` - mps -k "$pak" && mps -kur "$pkt" - done - done - rm -rf otokur.list -} - -paket_kur_oto_zorla(){ - local kpkt pkt pak kliste - if [ "$1" = "-H" ];then - ls *.mps.lz > "otokur.list" - kliste="otokur.list" - else - kliste="$1" - fi - for kpkt in `cat $kliste`;do - for pkt in `ls $kpkt* | cut -d'#' -f1`;do - pak=`ls "$pkt#"*` - paket_sil "$pkt" "evet" - mps -k "$pak" && mps -kur "$pkt" - done - done - rm -rf otokur.list -} - -paket_kur_liste(){ - local kpkt pkt pak - for kpkt in `cat $1`;do - for pkt in `ls $kpkt* | cut -d'#' -f1`;do - pak=`ls "$pkt#"*` - mps -k "$pak" - done - done -} - -paket_kur_liste_zorla(){ - local kpkt pkt pak - for kpkt in `cat $1`;do - for pkt in `ls $kpkt* | cut -d'#' -f1`;do - pak=`ls "$pkt#"*` - paket_sil "$kpkt" "evet" - mps -k "$pak" - done - done -} - -#otomatik kontrollu kur -paket_kur_oto2(){ - mps -dly "$1" > /dev/null && mps -ok bag.liste -} - -paket_inkur_liste_direk(){ - local kpkt - for kpkt in `cat $1`;do - mps -ik "$kpkt" - done -} - -paket_inkur_liste(){ - local kpkt - for kpkt in `cat $1`;do - mps -kur "$kpkt" - done -} - -#otomatik kontrollu kur -paket_inkur_oto(){ - mps -dly "$1" > /dev/null && - local kpkt - for kpkt in `cat bag.liste`;do - mps -ik "$kpkt" - done - rm -rf *.liste *.eski -} - -paket_sil_oto(){ - local spkt - for spkt in `cat $1`;do - oto_silme="evet" - paket_sil "$spkt" "$oto_silme" - done -} - -paket_guncelle(){ - surum_kontrol $1 - devir_kontrol $1 -} - -paket_guncelle_oto(){ - mps -dly "$1" > /dev/null && - local kpkt - for kpkt in `cat bag.liste`;do - mps -g "$kpkt" - done - rm bag.liste tumbag.liste -} - -sistem_guncelle(){ - local kpkt - for kpkt in `mps -kl`;do - mps -g "$kpkt" - done -} - -surum_kontrol(){ - local ksurum version pkt dusuk yuksek durum - durum="belirsiz" - satir=`sed -n '7p' < /var/lib/pkg/DB/"$1"/META` - ksurum=${satir:1:${#satir}-1} - pkt="`find $talimatname_dizin -name $1`" - source $pkt/talimat - dusuk=`echo -e "$ksurum\n$version" | sort -V | head -n1` - - if [ "$ksurum" = "$version" ];then - durum="guncel" - else - if [ "$ksurum" = "$dusuk" ];then - durum="yukselt" - else - durum="dusur" - fi - - if [ "$durum" <> "guncel" ];then - mps -s $1 - mps -ik $1 - fi - fi - ryaz 33 "$1 surum kontrolu $ksurum & $version $durum" -} - -devir_kontrol(){ - local kdevir release pkt dusuk yuksek durum - durum="belirsiz" - satir=`sed -n '8p' < /var/lib/pkg/DB/"$1"/META` - kdevir=${satir:1:${#satir}-1} - pkt="`find $talimatname_dizin -name $1`" - source $pkt/talimat - dusuk=`echo -e "$kdevir\n$release" | sort -V | head -n1` - - if [ "$kdevir" = "$release" ];then - durum="guncel" - else - if [ "$kdevir" = "$dusuk" ];then - durum="yukselt" - else - durum="dusur" - fi - - if [ "$durum" <> "guncel" ];then - mps -s $1 - mps -ik $1 - fi - fi - ryaz 33 "$1 devir kontrolu $kdevir & $release $durum" -} - -paket_derle(){ - #eski derleme kalıntılarını temizle - if [ -d tmp.* ];then - rm -r tmp.* - fi - kaynakdizin_kontrol - local konum derleme_onay eh bagimd - derleme_onay="h" - konum="`find "$talimatname_dizin" -name $1`" - if [ -d "$konum" ];then - mkdir -p tmp."$1" - cp -a $konum/* tmp."$1"/ - cd tmp."$1" - if [ "`kurulu_kontrol "$1"`" = "kurulu" ] && [ "$zorla_derle" = "yok" ];then - derleme_onay="h" - else - echo "-----" - derleme_onay="e" - fi - if [ "$derleme_onay" = "e" ];then - ryaz 33 "$1" "derleniyor...." - #mpsd -d > /dev/null - #mpsd -d - echo "------------------------" - mpsd -d 2>&1|tee /tmp/"$1".log - if ( grep "^=======>" /tmp/"$1".log| tail -1 |grep "ERROR" > /dev/null);then - echo "derleme sisteminde hata oluştu -----> " /tmp/"$1".log - exit 1 - fi - if [ "$kurulum_onay" = "evet" ];then - for kpkt in `ls $1* | cut -d'#' -f1`;do - mps -k "$kpkt#"* - done - fi - mv *.mps.lz ../ - else - ryaz 32 "paket zaten kurulu,yine de derlemek için: - mps -zd $1" - fi - cd .. - rm -r tmp."$1" - else - ryaz 31 "talimat dosyası bulunamadı." - fi - -} - - -bagimlilar(){ - local bagimd konum - konum="`find "$talimatname_dizin" -name $1`" - if [ -f "$konum/talimat" ];then - bagimd=`cat $konum/talimat | grep "Depends on" | cut -d':' -f2` - - if [ -n "$bagimd" ]; then - bagimd=`echo "$bagimd" | sed 's/,/ /g'` - #sıralı gösterme - echo `echo "$bagimd" | sed 's/,/ /g'` - fi - else - echo "talimatyok" - exit 1 - fi -} - -bagimli_bilgi(){ - local bagimd konum bag - konum="`find "$talimatname_dizin" -name $1`" - bagimd=`cat $konum/talimat | grep "Depends" | cut -d':' -f2` - if [ -n "$bagimd" ]; then - bagimd=`echo "$bagimd" | sed 's/,/ /g'` - #sıralı gösterme - #echo `echo "$bagimd" | sed 's/,/ /g'` - #kurulu kontrollu gosterim - for bag in $bagimd;do - echo $bag "`kurulu_kontrol $bag`" - done - fi - echo "$1" "`kurulu_kontrol $1`" - -} - -ters_bagimli(){ - local ara - ara=" $1 " - sy=`grep -o "/" <<<"$talimatname_dizin" | wc -l` - grep -rli "$ara" "$talimatname_dizin" | cut -d'/' -f`expr $sy + 3` -} - -silme_kurban_kontrol(){ - local dizin - for f in $(cat $1) ; do - dizin="${f%\'}" - dizin="${dizin#\'}" - if [ -d "$dizin" ];then - for g in `ls "$dizin"` ; do - if ! grep -Fxq " '$dizin/$g'" "$1" - then - echo "$dizin/$g" - fi - done - fi - done -} - -kurban_kurtar(){ - local dizin paket - paket=$1 - if [ -f /var/lib/pkg/DB/$paket/kurulan ];then - cat /var/lib/pkg/DB/$paket/kurulan | cut -d '>' -f2 > /tmp/$paket.sil - for f in $(cat /tmp/$paket.sil) ; do - dizin="${f%\'}" - dizin="${dizin#\'}" - if [ -d "$dizin" ];then - for g in `ls "$dizin"` ; do - if ! grep -Fxq " '$dizin/$g'" "/tmp/$paket.sil" - then - if [ -f /tmp/$paket.kurtar ];then - rm /tmp/$paket.kurtar - fi - echo " '$dizin'" >> "/tmp/$paket.kurtar" - fi - done - fi - done - if [ -f /tmp/$paket.kurtar ];then - mv /var/lib/pkg/DB/$paket/kurulan /var/lib/pkg/DB/$paket/ilk.kurulan - grep -v -F -x -f "/tmp/$paket.kurtar" "/tmp/$paket.sil" > /var/lib/pkg/DB/$paket/kurulan - ryaz 32 "$paket kurban dosyaları kurtarıldı." - else - ryaz 32 "$paket kurban dosyası yok." - fi - rm -f /tmp/$paket.sil - else - ryaz 31 "kurulan paket yok!" - fi -} - -ters_bagimli_kontrol(){ - ters_bagimli "$1" | sort > tersb.liste - ls /var/lib/pkg/DB/ | sed "/$1/d" | sort > simdiki.liste - comm -12 tersb.liste simdiki.liste - rm tersb.liste simdiki.liste -} - -kurulu_kontrol(){ - if [ -d "$kokdizin/var/lib/pkg/DB/$1" ];then - echo "kurulu" - exit 1 - fi - echo "degil" -} - -sistem_kur(){ - local spaket - for spaket in `cat $1`;do - ./$betikad -ik "$spaket" -kok $2; - done -} - -kaynakdizin_kontrol(){ - if [ ! -d $DERLEME_KAYNAKDIZIN ];then - mkdir $DERLEME_KAYNAKDIZIN - fi -} - -logdizin_kontrol(){ - if [ ! -d $kokdizin$LOGDIZIN ];then - mkdir $kokdizin$LOGDIZIN - fi - if [ ! -d $kokdizin$LOGDIZIN/derleme ];then - mkdir $kokdizin$LOGDIZIN/derleme - fi - if [ ! -f $kokdizin$LOGDIZIN/mps.log ];then - touch $kokdizin$LOGDIZIN/mps.log - fi -} - -tarihce_dkontrol(){ - if [ ! -d $TARIHCE_DIZIN ];then - mkdir $TARIHCE_DIZIN - fi -} - -temel_tarihce_kontrol(){ - if [ ! -f $TARIHCE_DIZIN/temel-pkvt.tar.lz ];then - tarihce_olustur "temel" - fi -} - -tarihce_liste(){ - tarihce_dkontrol - ls $TARIHCE_DIZIN/ - -} - -tarihce_yap(){ - tarihce_dkontrol - local t_isim - if [ "$temel_tarihce" = "evet" ];then - t_isim="temel" - else - t_isim=`date +%m-%d-%y.%H%M%S` - fi - tarihce_olustur "$t_isim" -} - -tarihce_olustur(){ - bsdtar -P -r -f $TARIHCE_DIZIN/"$1"-pkvt.tar $VT - lzip -9 $TARIHCE_DIZIN/"$1"-pkvt.tar -} - -tarihce_yukle(){ - tarihce_dkontrol - local islem_onay cikis - sil_onay="h" - if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then - bsdtar -p -o -C /tmp -xf $TARIHCE_DIZIN/"$1-pkvt.tar.lz" 2>/dev/null - ls /tmp/var/lib/pkg/DB/ > hedef.pkvt - ls /var/lib/pkg/DB/ > simdiki.pkvt - grep -v -F -x -f hedef.pkvt simdiki.pkvt > sil.liste - grep -v -F -x -f simdiki.pkvt hedef.pkvt > kur.liste - #rm hedef.pkvt simdiki.pkvt - rm -r /tmp/var - cikis="" - if [ -s sil.liste ];then - ryaz 32 "silinecekler" - ryaz 32 "------------" - cat sil.liste - fi - - if [ -s kur.liste ];then - ryaz 32 "kurulacaklar" - ryaz 32 "------------" - cat kur.liste - fi - if [ ! -s sil.liste ] && [ ! -s kur.liste ];then - ryaz 32 "sistem zaten hedef durumda!" - exit 1 - fi - while true; do - ryaz 34 "otomatik geri dönüşüm başlasın mı?";read -p "e veya h-> " eh - case $eh in - [Ee]* ) islem_onay="e"; break;; - [Hh]* ) break;; - * ) echo "e veya h";; - esac - done - if [ "$islem_onay" = "e" ];then - mps -os sil.liste - mps -kurul kur.liste - mv sil.liste silinenler.liste - mv kur.liste kurulanlar.liste - exit 1 - fi - mv sil.liste sil_iptal.liste - mv kur.liste kur_iptal.liste - else - ryaz 31 "ilgili tarihce dosyası bulunamadı!" - fi -} - -tarihce_sil(){ - tarihce_dkontrol - if [ -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" ];then - rm -f $TARIHCE_DIZIN/"$1-pkvt.tar.lz" - else - ryaz 31 "ilgili tarihce dosyası bulunamadı!" - fi -} - -loglama(){ - logdizin_kontrol - echo "$(date +'%F %T') $1" >> "$kokdizin/$LOGDIZIN/mps.log" -} - -dosyadan_talimat_islem(){ - local dosya - dosya=$1 - urlkont='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' - if [[ $dosya =~ $urlkont ]] - then - ryaz 32 "talimat linkten cekilecek" - gdosya=`mktemp` - wget $dosya -O $gdosya - dosya=$gdosya - fi - if [ ! -f $dosya ];then - ryaz 31 "$dosya talimat dosyasi yok!" - exit 1 - fi - - local paketisim - paketisim=`grep -ri 'name=' $dosya | cut -d'=' -f 2` - if [ ! -n "$paketisim" ]; then - ryaz 31 "paket ismi degiskeni bulunamadı!" - exit 1 - fi - if [ ! -f /root/talimatname/genel/$paketisim ];then - mkdir /root/talimatname/genel/$paketisim - cp -f $dosya /root/talimatname/genel/$paketisim/talimat - ryaz 32 "$paketisim talimatı hazırlandı." - else - ryaz 31 "$paketisim talimatı zaten talimatnamede var!" - fi -} - -talimat_olustur(){ -if [ "$1" = '?' ];then - ryaz 34 "kullanım : mps -to paket_ismi" -else - local name - name=$1 - mkdir -p $name - tee "$name/talimat" > /dev/null < /dev/null; then - if [ $? -eq 0 ]; then - ryaz 32 "paket veritabanı guncellenıyor." "$paketdepo""paket.vt" - if [ -f "$paketdepo""paket.vt" ];then - mv "$paketdepo""paket.vt" "$paketdepo""paket.vt.eski" - fi - wget -q --show-progress -P "$paketdepo" "$sunucu""paket.vt" - #rm /tmp/paket.vt* - mps -kudo - exit 1 - fi - ryaz 31 "paket veritabanı guncelleme olumsuz." -} - -talimat_bilgi(){ - local konum HEAD - konum="`find "$talimatname_dizin" -name $1`" - HEAD=`grep -B 12 "build()" $konum/talimat` - echo $HEAD -} - -sistem_kontrol(){ - paketvt_kontrol - sunucu_kontrol -} - -sunucu_kontrol(){ - wget -q --spider $sunucu - if [ $? -eq 0 ]; then - ryaz 32 "paket sunucu aktif" - else - ryaz 31 "sunucu erişim dışı" - exit 1 - fi -} - -gitayar_kontrol(){ - if [ ! -f /root/.gitconfig ];then - git_ssl_iptal - git_otokimlik - fi -} - -kurulum_dogrulama(){ - for kuruland in `ls $VT` - do - if [ ! -f "$VT/$kuruland/kurulan" ]; then - ryaz 32 "$kuruland hasarlı kurulum tesbiti!" - rm -r $VT/$kuruland - mps -i $kuruland - mps -k "$paketdepo/$kuruland"*.mps.lz - ryaz 32 "$kuruland hasarlı kurulum onarıldı." - fi - done -} - -kurulum_dosya_listele(){ - cat "$VT/$1/kurulan" -} - -paketvt_kontrol(){ - mkdir -p /depo/paketler - if [ ! -f /depo/paketler/paket.vt ];then - touch /depo/paketler/paket.vt - fi -} - -pvt_olustur(){ - if [ ! -f paket.vt ];then - touch paket.vt - fi - if [ -f "paket.vt" ];then - mv "paket.vt" "paket.vt.eski" - fi - ryaz 32 "paket.vt oluşturuluyor...." - for paket in `ls *.mps.lz` - do - paketad="`echo $paket|cut -d "#" -f1`" - shaek=`sha1sum $paket` - - echo $paketad $shaek >> paket.vt - done - ryaz 32 "paket.vt oluşturuldu." -} - -paket_indir(){ - local pkt - if [ -f "$paketdepo""paket.vt" ];then - pkt=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f3` - ekontdeg=`cat "$paketdepo""paket.vt" | grep "^$1 " | cut -d' ' -f2` - cpaket="${pkt/'#'/'%23'}" - wget -nc -q --show-progress -P "$paketdepo" "$sunucu$cpaket" - if [[ "$?" != 0 ]]; then - ryaz 31 "indirme hatalı" - else - ryaz 34 "$1 indirildi" - fi - mkontdeg=`sha1sum "$paketdepo$pkt" | cut -d' ' -f1` - if [ "$ekontdeg" != "$mkontdeg" ];then - ryaz 31 "sha1sum uyusmaslik tesbit edildi,paket tekrar indiriliyor." - rm -f "$paketdepo$pkt" - paket_indir "$1" - fi - fi - - -} - -yardim(){ - echo "yardim" -} - - -ayarlar() { - - while [ "$1" ]; do - case $1 in - -i|--indir) - ikaynak="ag" - kurulum_onay="olumsuz";; - -ik|--inku) - if [ "$3" == "-kok" ] && [ -d "$4" ]; then - kokdizin="$4" - fi - ikaynak="ag" ;; - -ikz|--inkuzo) - ikaynak="ag" - tekrarkur="evet" ;; - -k|--yrku) - if [ "$3" == "-kok" ] && [ -d "$4" ]; then - kokdizin="$4" - tekrarkur="evet" - fi - ikaynak="yerel" ;; - -s|sil) - if [[ "$2" == "py-"* ]]; then - pypaket=`echo "$2" | cut -d'-' -f 2` - echo $pypaket "pip2 ile silinecek" - pip uninstall $pypaket - exit 1 - fi - if [[ "$2" == "py3-"* ]]; then - pypaket=`echo "$2" | cut -d'-' -f 2` - echo $pypaket "pip3 ile silinecek" - pip3 uninstall $pypaket - exit 1 - fi - paket_sil "$2" ;; - -sz|zorsil) - paket_sil "$2" "evet";; - -pa|ara) - paket_ara "$2" ;; - bul) - kelime_bul "$2" ;; - -d|--pkde) - zorla_derle="yok" - kurulum_onay="olumsuz" - paket_derle "$2" ;; - -zd|--pkzde) - zorla_derle="evet" - kurulum_onay="olumsuz" - paket_derle "$2" ;; - -dk|--pkdk) - paket_derle "$2" ;; - -derlist) - paket_derle_liste "$2" ;; - -derle) - paket_derle_kur "$2" ;; - -ok|--pkok) - paket_kur_oto "$2" ;; - -okz) - paket_kur_oto_zorla "$2" ;; - -okl|--pkokl) - paket_kur_liste "$2" ;; - -oklz) - paket_kur_liste_zorla "$2" ;; - -kh) - local templist - templist=`mktemp` - ls *.mps.lz > $templist - mps -okz -H $templist ;; - -ko|--pkko) - paket_kur_oto2 "$2" ;; - -kuruld) - paket_inkur_liste_direk "$2" ;; - -kurul) - paket_inkur_liste "$2" ;; - -kur) - paket_inkur_oto "$2" ;; - kur) - if [[ "$2" == "py-"* ]]; then - pypaket=`echo "$2" | cut -d'-' -f 2` - echo $pypaket "pip2 ile kurulacak" - pip install $pypaket - exit 1 - fi - if [[ "$2" == "py3-"* ]]; then - pypaket=`echo "$2" | cut -d'-' -f 2` - echo $pypaket "pip3 ile kurulacak" - pip3 install $pypaket - exit 1 - fi - if [[ "$2" == *"mps.lz"* ]]; then - if [ "$3" == "-kok" ] && [ -d "$4" ]; then - kokdizin="$4" - tekrarkur="evet" - fi - ikaynak="yerel" - else - paket_inkur_oto "$2" - fi ;; - gitkur) - git_proje_kur "$2" ;; - kurkos) - local pkt - pkt="`find $talimatname_dizin -name $2`" - if [ -f $pkt/$2.kur-kos ];then - bash $pkt/$2.kur-kos - else - ryaz 31 "$2 kur-kos yok!" - fi ;; - koskur) - local pkt - pkt="`find $talimatname_dizin -name $2`" - if [ -f $pkt/$2.kos-kur ];then - bash $pkt/$2.kos-kur - else - ryaz 31 "$2 kos-kur yok!" - fi ;; - silkos) - local pkt - pkt="`find $talimatname_dizin -name $2`" - if [ -f $pkt/$2.sil-kos ];then - bash $pkt/$2.sil-kos - else - ryaz 31 "$2 kur-kos yok!" - fi ;; - kossil) - local pkt - pkt="`find $talimatname_dizin -name $2`" - if [ -f $pkt/$2.kos-sil ];then - bash $pkt/$2.kos-sil - else - ryaz 31 "$2 kur-kos yok!" - fi ;; - -kdl) - if [ ! "$2" ]; then - ryaz 31 "paket ismi eksik" - exit 1 - fi - kurulum_dosya_listele "$2" ;; - -pak|--paketle) - if [ ! "$2" ]; then - ryaz 31 "paketlenecek dizin ismi eksik" - exit 1 - fi - yeniden_paketle "$2" ;; - -psk|--paksiskur) - if [ ! "$2" ]; then - ryaz 31 "paket liste yok" - exit 1 - fi - if [ ! "$3" ]; then - ryaz 31 "hedef dizin yok" - exit 1 - fi - sistem_kur "$2" "$3" ;; - -po) - pvt_olustur ;; - -os|--pkos) - if [ ! "$2" ]; then - ryaz 31 "silme listesi yok" - exit 1 - fi - paket_sil_oto "$2" ;; - -kl|--kurulu-liste) - ls $VT ;; - -dly|--drly) - if [ -f tumbag.liste ];then - mv tumbag.liste tumbag.liste.eski - fi - if [ -f bag.liste ];then - mv bag.liste bag.liste.eski - fi - touch tumbag.liste - touch bag.liste - derleme_listyap "$2" ;; - -dlb|--drlb) - derleme_listbilgi "$2";; - -b|--pkbl) - paket_bilgi "$2" ;; - #sunucu bilgisi alma - -sun|--sunucu) - ryaz 32 $sunucu ;; - -bb|--pkbb) - bagimli_bilgi "$2" | column -t;; - -tb|--pktb) - ters_bagimli "$2" ;; - -tbk|--pktbk) - ters_bagimli_kontrol "$2" ;; - -talb|--talb) - talimat_bilgi "$2" | column -t;; - -to) - if [ ! "$2" ]; then - ryaz 31 "talimat ismi eksik" - exit 1 - fi - talimat_olustur "$2" ;; - guncelle) - mps -GG && mps -G ;; - -Ggit|-GG) - git_guncelle ;; - -G|--pvtg) - paketvt_guncelle - mps -kudo ;; - #komple kurulu sistemin guncellenmesi - -GS) - sistem_guncelle ;; - #tekil paket guncelleme-single package updating - -g|--pkgu) - if [ ! "$2" ]; then - ryaz 31 "paket ismi eksik" - exit 1 - fi - paket_guncelle "$2";; - #bagimliliklariyla beraber paket guncelleme-package updating with depencies - -go|--pkgo) - if [ ! "$2" ]; then - ryaz 31 "paket ismi eksik" - exit 1 - fi - paket_guncelle_oto "$2";; - -kk|--kurulu-kontrol) - if [ ! "$2" ]; then - ryaz 31 "paket ismi eksik" - exit 1 - fi - ryaz 31 `kurulu_kontrol "$2"`;; - -kudo) - kurulum_dogrulama ;; - -kdk) - kurban_kurtar $2 ;; - -suko) - sunucu_kontrol ;; - -dota) - dosyadan_talimat_islem $2 ;; - -cf|--config-file) - if [ ! "$2" ]; then - echo "ayardosyası gerek $1" - exit 1 - fi - ayar_dosyasi="$2" - shift ;; - -tro) - tarihce_yap ;; - -trot) - temel_tarihce="evet" - tarihce_yap ;; - -try) - if [ ! "$2" ]; then - ryaz 31 "tarihce dosyasi eksik $1" - exit 1 - fi - tarihce_yukle "$2" - shift ;; - -trl) - tarihce_liste ;; - -trs) - if [ ! "$2" ]; then - ryaz 31 "parametre eksik $1" - exit 1 - fi - tarihce_sil "$2" - shift ;; - -v) - ryaz 33 "$betikad $versiyon $iletisim" - exit 0 ;; - -h|--help) - yardim - exit 0 ;; - - esac - shift - done -} - -yardim() { - cat <<_EOF - -$betikad $versiyon Milis Paket Sistemi - -Secenekler: - -G ikili paket veritabanını günceller - -Ggit git sunucusundan talimatname ve sistem gunceller - -kur paket_ismi ilgili paketi bagimliliklariyla agdan cekip kurar - -s paket_ismi ilgili paketi kaldirir - -k paket_ismi yereldeki paketi bagimliliksiz kurar - -kl kurulu paket listesini verir - -kk paket_ismi ilgili paketin kurulu olma durumunu verir - -d paket_ismi ilgili paketin talimat dosyasına göre - sadece derler,paketler - -derle paket_ismi ilgili paketin talimat dosyasına göre bagimliliklariyla - beraber derler,paketler ve kurar. - -_EOF - exit 1 -} - -ana(){ -if [ `id -u` = 0 ] ; then - ayarlar "$@" - - if [ "$ikaynak" = "ag" ]; then - local kontroldeg - kkont=`kurulu_kontrol "$2"` - if [ "$kkont" = "degil" ] || [ "$tekrarkur" = "evet" ];then - pkt=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f3` - if [ ! -z "$pkt" -a "$pkt" != "" ]; then - cpaket="${pkt/'#'/'%23'}" - ryaz 33 "agdan cekiliyor:" "$2" - #paket sunucuda varsa - wget -q --spider "$sunucu$cpaket" - #if wget -P /tmp -q "$sunucu$cpaket" > /dev/null; then - if [ $? -eq 0 ]; then - #wget -P "$paketdepo" "$sunucu$cpaket" - paket_indir "$2" - - if [ "$kurulum_onay" = "evet" ];then - if [ "$tekrarkur" = "evet" ];then - paket_sil "$2" "evet" - fi - icerik_ekle "$paketdepo$pkt" - exit 1 - fi - else - ryaz 31 "paket sunucuda yok!" - fi - else - ryaz 31 "paket sunucuda yok!( mps -G komutuyla güncelleme yapınız. )" - fi - else - ryaz 32 "$2 paketi zaten kurulu!" - fi - exit 1 - fi - - if [ "$ikaynak" = "yerel" ]; then - local silme - pkontrol=`basename $2 | grep -w "mps.lz"` - if [ ! -z "$pkontrol" -a "$pkontrol" != "" ]; then - paketad=`echo "$2" | cut -d'#' -f1` - kkont=`kurulu_kontrol "$paketad"` - if [ "$kkont" = "degil" ];then - icerik_ekle "$2" - else - echo $tekrarkur - if [ "$tekrarkur" = "hayir" ];then - while true; do - ryaz 31 "$2 paketi zaten kurulu silinip kurulsun mu?" - read -p "e veya h -> " eh - case $eh in - [Ee]* ) silme="e"; break;; - [Hh]* ) break;; - * ) echo "e veya h";; - esac - done - fi - if [ "$silme" = "e" ];then - ryaz 33 "silinecekelerin kontrolu için" - paket_sil "$paketad" - icerik_ekle "$2" - fi - fi - else - ryaz 31 "yerelde mps paketi bulunamadı." - fi - fi -else - sudo mps "$@" -fi -} -ana "$@" - - -#31 kirmizi -#32 yesil -#33 sari -#34 mavi -#34 mor diff --git a/mps-0.8/mpsd b/mps-0.8/mpsd deleted file mode 100755 index 90a24465a..000000000 --- a/mps-0.8/mpsd +++ /dev/null @@ -1,1540 +0,0 @@ -#!/bin/bash - -# error codes -E_GENERAL=1 -E_TALIMAT=2 # hatalı talimat -E_DIR_PERM=3 # (source/build) directory missing or missing read/write permission -E_DOWNLOAD=4 # error during download -E_UNPACK=5 # error during unpacking of source file(s) -E_MD5=6 # md5sum verification failed -E_FOOTPRINT=7 # footprint check failure -E_BUILD=8 # error while running 'build()' -E_INSTALL=9 # error while installing the package via 'pkgadd' -E_DEPS=10 # error while searching runtime deps via 'pkginfo -b' - -info() { - echo "=======> $1" -} -warning() { - info "UYARI: $1" >&2 -} -error() { - info "HATA: $1" >&2 -} -abort_on_build() { - error $1 - exit $E_BUILD -} -get_filename() { - if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then - echo "$DERLEME_KAYNAKDIZIN/${BASH_REMATCH[2]}" - else - echo $1 - fi -} -get_basename() { - local FILE="`echo $1 | sed 's|^.*://.*/||g'`" - echo $FILE -} -check_pkgfile() { - local NAME_TEST - if [ "${name}" == "" ]; then - error "Variable 'name' not initiated or not found in $PKGMK_PKGFILE." - exit $E_TALIMAT - elif [ "`type -t build`" != "function" ]; then - error "Function 'build' not specified in $PKGMK_PKGFILE." - exit $E_TALIMAT - fi - NAME_TEST=`echo "${name}" | sed 's@[[a-z0-9]*[-_+]*]*@@g'` - if [ "$NAME_TEST" != "" ]; then - error "Variable 'name' contains illegal characters: $NAME_TEST" - exit $E_TALIMAT - fi - if [ ${#name} -gt 50 ];then - error "Variable 'name' length higher then 50 characters." - exit $E_TALIMAT - fi - if [ "${version}" == "" ]; then - error "'versiyon' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." - exit $E_TALIMAT - fi - if [ "$SURUM_YOKSAY" = "yok" ]; then - if [ "${release}" == "" ]; then - error " 'release' degeri $PKGMK_PKGFILE dosyası içinde yok veya tanımlı degil." - exit $E_TALIMAT - fi - fi - - -} -get_package_name() { - local NAME EXT - if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then - EXT=$PKT_UZANTISI - else - EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU - fi - #eski - #NAME=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` - #echo "${NAME:0:$((${#NAME} - 10 ))}" - NAME=`echo "$1" | cut -d'#' -f1` - echo "$NAME" -} -get_package_builddate() { - local NAME BUILD_DATE EXT - if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then - EXT=$PKT_UZANTISI - else - EXT=$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU - fi - NAME="`get_package_name $1`" - BUILD_DATE=`echo $1|sed "s/i686.$EXT//"|sed "s/x86_64.$EXT//"|sed "s/any.$EXT//"` - echo "${BUILD_DATE:$((${#NAME}))}" -} -get_package_extension() { - local EXTENSION - if [ "${1:$((${#1} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then - EXTENSION=".$PKT_UZANTISI" - else - EXTENSION=".$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" - fi - echo $EXTENSION -} -get_package_arch() { - local NAME BUILD_DATE EXTENSION - NAME=`get_package_name $1` - BUILD_DATE=`get_package_builddate $1` - EXTENSION=`get_package_extension $1` - echo $1|sed "s/$NAME$BUILD_DATE//"|sed "s/$EXTENSION//" -} -check_directory() { - if [ ! -d $1 ]; then - error "Directory '$1' does not exist." - exit $E_DIR_PERM - elif [ ! -w $1 ]; then - error "Directory '$1' not writable." - exit $E_DIR_PERM - elif [ ! -x $1 ] || [ ! -r $1 ]; then - error "Directory '$1' not readable." - exit $E_DIR_PERM - fi -} -check_file() { - if [ -e $1 ] && [ ! -w $1 ]; then - error "File '$1' is not writable." - exit $E_GENERAL - fi -} -downloads_file_with_curl() { - if [ ! "`type -p curl`" ]; then - error "Command 'curl' not found." - exit $E_GENERAL - fi - DOWNLOAD_OPTS="--ftp-pasv --retry 3 --retry-delay 3 \ - -R -o $1 --fail -#" - - error=1 - - curl $DOWNLOAD_OPTS $2 - error=$? - if [ $error != 0 ]; then - error "İndiriliyor '$2' başarısız." - exit $E_DOWNLOAD - fi -} -download_file() { - info "İndiriliyor '$1'." - - LOCAL_FILENAME=`get_filename $1` - - if [ ! "`type -p wget`" ]; then - warning "Command 'wget' not found." - info "You should install 'wget' as soon as possible, trying with curl ..." - downloads_file_with_curl $LOCAL_FILENAME $1 - else - LOCAL_FILENAME_PARTIAL="$LOCAL_FILENAME.partial" - DOWNLOAD_OPTS="--passive-ftp --no-directories --tries=3 --waitretry=3 \ - --directory-prefix=$DERLEME_KAYNAKDIZIN \ - --output-document=$LOCAL_FILENAME_PARTIAL --no-check-certificate" - - if [ -f "$LOCAL_FILENAME_PARTIAL" ]; then - info "Kısmi indirme var,tamamlanmaya çalışılacak" - RESUME_CMD="-c" - fi - - error=1 - - BASENAME=`get_basename $1` - for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do - REPO="`echo $REPO | sed 's|/$||'`" - wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $REPO/$BASENAME - error=$? - if [ $error == 0 ]; then - break - fi - done - - if [ $error != 0 ]; then - while true; do - wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $1 - error=$? - if [ $error != 0 ] && [ "$RESUME_CMD" ]; then - info "Partial download failed, restarting" - rm -f "$LOCAL_FILENAME_PARTIAL" - RESUME_CMD="" - else - break - fi - done - fi - - if [ $error != 0 ]; then - error "İndiriliyor '$1' başarısız." - exit $E_DOWNLOAD - fi - - mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME" - fi -} -download_source() { - local FILE LOCAL_FILENAME - - for FILE in ${source[@]}; do - LOCAL_FILENAME=`get_filename $FILE` - if [ ! -e $LOCAL_FILENAME ]; then - if [ "$LOCAL_FILENAME" = "$FILE" ]; then - error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)." - exit $E_DOWNLOAD - else - if [ "$PKGMK_DOWNLOAD" = "evet" ]; then - download_file $FILE - else - error "Source file '$LOCAL_FILENAME' not found (use option -d to download)." - exit $E_DOWNLOAD - fi - fi - fi - done -} -remove_source() { - local FILE LOCAL_FILENAME - for FILE in ${source[@]}; do - LOCAL_FILENAME=`get_filename $FILE` - if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then - info "Removing $LOCAL_FILENAME" - rm -f $LOCAL_FILENAME - fi - done -} -unpack_source() { - local FILE LOCAL_FILENAME COMMAND - - for FILE in ${source[@]}; do - LOCAL_FILENAME=`get_filename $FILE` - case $LOCAL_FILENAME in - *.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm) - if [ "$PKGMK_IGNORE_UNPACK" != "evet" ];then - COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" - else - COMMAND="cp $LOCAL_FILENAME $SRC" - fi ;; - *) - COMMAND="cp $LOCAL_FILENAME $SRC" ;; - esac - - echo "$COMMAND" - - $COMMAND - - if [ $? != 0 ]; then - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - error "'$TARGET' derlenmesi basarisiz." - exit $E_UNPACK - fi - done -} -get_package_list() { - local ARCHFILE i - i=0 - for ARCH in x86_64 i686 any; do - for FILE in `find $PKGMK_PACKAGE_DIR -name "${name}*$ARCH.$PKT_UZANTISI*"`; do - TARGETS[i]=`basename $FILE` - i=$((i+1)) - done - done -} -make_md5sum() { - local FILE LOCAL_FILENAMES - - if [ "$source" ]; then - for FILE in ${source[@]}; do - LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`" - done - - md5sum $LOCAL_FILENAMES | sed -e 's| .*/| |' | sort -k 2 - fi -} - -make_footprint() { -if ! (echo $TARGET| grep "kernel" >/dev/null); then - pkginfo --footprint $TARGET | \ - sed "s|\tlib/modules/`uname -r`/|\tlib/modules//|g" | \ - sort -k 3 -else - pkginfo --footprint $TARGET | sort -k 3 -fi -} - -check_md5sum() { - local FILE="$DERLEME_SANTIYE/.tmp" - - cd $PKGMK_ROOT - - if [ -f $PKGMK_MD5SUM ]; then - make_md5sum > $FILE.md5sum - sort -k 2 $PKGMK_MD5SUM > $FILE.md5sum.orig - diff -w -t -U 0 $FILE.md5sum.orig $FILE.md5sum | \ - sed '/^@@/d' | \ - sed '/^+++/d' | \ - sed '/^---/d' | \ - sed 's/^+/NEW /g' | \ - sed 's/^-/MISSING /g' > $FILE.md5sum.diff - if [ -s $FILE.md5sum.diff ]; then - error "Md5sum mismatch found:" - cat $FILE.md5sum.diff >&2 - - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - - if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then - error "Md5sum not ok." - exit $E_MD5 - fi - - error "'$TARGET' derleme basarisiz." - exit $E_MD5 - fi - else - if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - info "Md5sum not found." - exit $E_MD5 - fi - - warning "Md5sum not found, creating new." - make_md5sum > $PKGMK_MD5SUM - fi - - if [ "$PKGMK_CHECK_MD5SUM" = "evet" ]; then - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - info "Md5sum ok." - exit 0 - fi -} - -strip_files() { - local FILE FILTER - - cd $PKG - - if [ -f $PKGMK_ROOT/$PKGMK_NOSTRIP ]; then - FILTER="grep -v -f $PKGMK_ROOT/$PKGMK_NOSTRIP" - else - FILTER="cat" - fi - - find . -type f -printf "%P\n" | $FILTER | while read FILE; do - case $(file -b "$FILE") in - *ELF*executable*not\ stripped) - strip --strip-all "$FILE" - ;; - *ELF*shared\ object*not\ stripped) - strip --strip-unneeded "$FILE" - ;; - current\ ar\ archive) - strip --strip-debug "$FILE" - esac - done -} - -compress_manpages() { - local FILE DIR TARGET - - cd $PKG - - find . -type f -path "*/share/man*/*" | while read FILE; do - if [ "$FILE" = "${FILE%%.gz}" ]; then - gzip -9 "$FILE" - fi - done - - find . -type l -path "*/share/man*/*" | while read FILE; do - TARGET=`readlink -n "$FILE"` - TARGET="${TARGET##*/}" - TARGET="${TARGET%%.gz}.gz" - rm -f "$FILE" - FILE="${FILE%%.gz}.gz" - DIR=`dirname "$FILE"` - - if [ -e "$DIR/$TARGET" ]; then - ln -sf "$TARGET" "$FILE" - fi - done - find . -type f -path "*/share/info/*" | while read FILE; do - if [ "$FILE" = "${FILE%%.gz}" ]; then - gzip -9 "$FILE" - fi - done - find . -type l -path "*/share/info/*" | while read FILE; do - TARGET=`readlink -n "$FILE"` - TARGET="${TARGET##*/}" - TARGET="${TARGET%%.gz}.gz" - rm -f "$FILE" - FILE="${FILE%%.gz}.gz" - DIR=`dirname "$FILE"` - - if [ -e "$DIR/$TARGET" ]; then - ln -sf "$TARGET" "$FILE" - fi - done -} - -check_footprint() { - local TARGET FILE="$DERLEME_SANTIYE/.tmp" - - cd $PKGMK_PACKAGE_DIR - if [ -z $TARGETS ]; then - get_package_list - if [ -z $TARGETS ]; then - error "Unable to update footprint" - fi - fi - for TARGET in ${TARGETS[@]}; do - if [ -f $TARGET ]; then - PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint - make_footprint > $FILE.footprint - if [ -f $PKGMK_FOOTPRINT ]; then - sort -k 3 $PKGMK_FOOTPRINT > $FILE.footprint.orig - diff -w -t -U 0 $FILE.footprint.orig $FILE.footprint | \ - sed '/^@@/d' | \ - sed '/^+++/d' | \ - sed '/^---/d' | \ - sed 's/^+/NEW /g' | \ - sed 's/^-/MISSING /g' > $FILE.footprint.diff - if [ -s $FILE.footprint.diff ]; then - if [ "$PKGMK_IGNORE_NEW" = "evet" ]; then - mv $FILE.footprint $PKGMK_FOOTPRINT - warning "Footprint mismatch found:" - else - error "Footprint mismatch found:" - BUILD_SUCCESSFUL="yok" - fi - cat $FILE.footprint.diff >&2 - fi - else - warning "Footprint not found, creating new." - mv $FILE.footprint $PKGMK_FOOTPRINT - fi - else - error "Package '$TARGET' was not found." - BUILD_SUCCESSFUL="yok" - fi - done -} - -make_work_dir() { - export PKG="$DERLEME_SANTIYE/pkg" - export SRC="$DERLEME_SANTIYE/src" - - umask 022 - - cd $PKGMK_ROOT - remove_work_dir - mkdir -p $SRC $PKG - - if [ "$MD5SUM_YOKSAY" = "yok" ]; then - check_md5sum - fi -} - -remove_work_dir() { - rm -rf $DERLEME_SANTIYE -} -pack_lib() { - local DIR SUBDIR - for DIR in usr opt/*; do - for SUBDIR in lib lib64; do - if [ -d $DIR/$SUBDIR/pkgconfig ]; then - mv $DIR/$SUBDIR/pkgconfig $PKG - fi - if [ -d $DIR/$SUBDIR ]; then - bsdtar -r -f \ - $PKGMK_PACKAGE_DIR/${name}.${group}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} \ - $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" - rm -r $DIR/$SUBDIR - j=1 - fi - if [ -d $PKG/pkgconfig ]; then - mkdir $DIR/$SUBDIR - mv $PKG/pkgconfig $DIR/$SUBDIR/pkgconfig - fi - done - done -} -remove_lib() { - local DIR SUBDIR - for DIR in usr opt/*; do - for SUBDIR in lib lib64;do - if [ -d $DIR/$SUBDIR ]; then - rm -r $DIR/$SUBDIR - fi - done - done -} -pack_devel() { - local DIR SUBDIR - for DIR in usr opt/*; do - for SUBDIR in include lib/pkgconfig; do - if [ -d $DIR/$SUBDIR ]; then - bsdtar -r -f \ - $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ - $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" - rm -r $DIR/$SUBDIR - j=1 - - fi - done - done -} -remove_devel() { - local DIR SUBDIR - for DIR in usr opt/*; do - for SUBDIR in include lib/pkgconfig; do - if [ -d $DIR/$SUBDIR ]; then - rm -r $DIR/$SUBDIR - fi - done - done -} -pack_doc() { - local DIR SUBDIR - for DIR in usr/share opt/*/share; do - for SUBDIR in doc gtk-doc; do - if [ -d $DIR/$SUBDIR ]; then - bsdtar -r -f \ - $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ - $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" - j=1 - fi - done - done -} -remove_doc() { - local DIR SUBDIR - for DIR in usr/share opt/*/share; do - for SUBDIR in doc gtk-doc; do - if [ -d $DIR/$SUBDIR ]; then - rm -r $DIR/$SUBDIR - fi - done - done -} -pack_man() { - local DIR SUBDIR - for DIR in usr/share opt/*/share; do - for SUBDIR in info man; do - if [ -d $DIR/$SUBDIR ]; then - bsdtar -r -f \ - $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ - $DIR/$SUBDIR || BUILD_SUCCESSFUL="yok" - j=1 - fi - done - done -} -remove_man() { - local DIR SUBDIR - for DIR in usr/share opt/*/share; do - for SUBDIR in info man; do - if [ -d $DIR/$SUBDIR ]; then - rm -r $DIR/$SUBDIR - fi - done - done -} -pack_service() { - local DIR="etc/rc.d" - if [ -d $DIR ]; then - bsdtar -r -f \ - $PKGMK_PACKAGE_DIR/${name}.${group}#$version-any.${PKT_UZANTISI} \ - $DIR || BUILD_SUCCESSFUL="yok" - j=1 - fi -} -remove_service() { - local DIR="etc/rc.d" - if [ -d $DIR ]; then - rm -r $DIR - fi -} -add_meta_files() { - local NAME - NAME="`get_package_name $1`" - cd $PKG - if [ -f $PKGMK_ROOT/${NAME}.okubeni ]; then - cp $PKGMK_ROOT/${NAME}.okubeni .README - fi - if [ -f $PKGMK_ROOT/${NAME}.kos-kur ]; then - cp $PKGMK_ROOT/${NAME}.kos-kur .PRE - fi - if [ -f $PKGMK_ROOT/${NAME}.kur-kos ]; then - cp $PKGMK_ROOT/${NAME}.kur-kos .POST - fi - for file in .README .PRE .POST; do - if [ -f $file ]; then - bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ - $file - rm $file - fi - done -} - -add_meta_to_archive() { - local NAME TAR SIZE_I DESC URL PACK MAINT ARCH - NAME="`get_package_name $1`" - ARCH="`get_package_arch $1`" - - info "$NAME arşivine üstbilgiler ekleniyor." - - TAR="$DERLEME_SANTIYE/tar" - mkdir -p $TAR - cd $TAR - - bsdtar xf $PKGMK_PACKAGE_DIR/$1 - - if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then - DESC="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^desc|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" - else - DESC="n.a" - fi - if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then - PACK="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^pack|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" - else - PACK="n.a" - fi - if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then - MAINT="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^maint|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" - else - MAINT="n.a" - fi - if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then - URL="`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^url|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" - else - URL="n.a" - fi - SIZE_I="`du -b $PKGMK_PACKAGE_DIR/$1|sed "s/\t/ /"|cut -d " " -f1`" - echo "N$NAME" > .META - echo "D$DESC" >> .META - echo "U$URL" >> .META - echo "M$MAINT" >> .META - echo "P$PACK" >> .META - echo "S$SIZE_I" >> .META - echo "V$version" >> .META - echo "r$release" >> .META - echo "B$PKGMK_BUILDVER" >> .META - echo "a$ARCH" >> .META - # TODO improve the pkginfo --runtimedepfiles functionnality - if [ "$PKGMK_IGNORE_RUNTIMEDEPS" == "yok" ];then - for dep in `pkginfo --runtimedepfiles $TAR|grep -v ^[A-Z]`; do - echo "R$dep" >> .META - done - # We don't want any .devel dependencies here - sed -i '/^R[[a-z0-9]*[-_+]*]*\.devel/d' .META - if [ ! -z $run ] && [ "$NAME" == "$name" ]; then - info "Adding runtime deps to Archive $NAME" - for rd in ${run[@]}; do - if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then - error "Runtime dependencie $rd not found, cannot continue" - clean - exit $E_DEPS; - fi - echo "R$rd`pkginfo -b $rd`" >> .META - done - fi - if [ -f $PKGMK_ROOT/${NAME}.run ]; then - info "Adding runtime deps to Archive $NAME" - for rd in `cat $PKGMK_ROOT/${NAME}.run`; do - if [ "`pkginfo -b $rd`" == "0" ] || [ "`pkginfo -b $rd`" == "" ]; then - error "Runtime dependencie $rd not found, cannot continue" - clean - exit $E_DEPS; - fi - echo "R$rd`pkginfo -b $rd`" >> .META - done - fi - fi - bsdtar -tf $PKGMK_PACKAGE_DIR/$1 > .MTREE - - rm $PKGMK_PACKAGE_DIR/$1 - - for file in .META .MTREE .README .PRE .POST .INFO; do - if [ -f $file ]; then - bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 \ - $file - fi - done - - bsdtar -r -f $PKGMK_PACKAGE_DIR/$1 * - - cd .. - rm -rf $TAR -} - -compress_archive() { - info "$1 sıkıştırılıyor." - case $PKT_SIKISTIRMA_MODU in - lz) lzip -9 $1;; - gz) gzip -9 $1;; - bz2) bzip2 -9 $1;; - xz) xz -z -9 $1;; - esac -} - -derle() { - if [ "$PAKETSIZ_DERLEME" = "evet" ]; then - paketsiz_derle - else - build_package - fi - -} - -paketsiz_derle() { - local BUILD_SUCCESSFUL="yok" - - export PKG="/" - export SRC="$DERLEME_SANTIYE/src" - umask 022 - - cd $PKGMK_ROOT - rm -rf $DERLEME_SANTIYE - mkdir -p $SRC - - info "derleniyor... '$TARGET'" - - if [ "$PKGMK_DOWNLOAD" = "evet" ]; then - download_source - fi - unpack_source - - cd $SRC - (set -e -x ; build) - - -# cd $PKG - - if [ $? = 0 ]; then - BUILD_SUCCESSFUL="evet" - - fi - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - - if [ "$BUILD_SUCCESSFUL" = "evet" ]; then - info " '$TARGET' derleme basarili" - else - if [ -f $TARGET ]; then - touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null - fi - error " '$TARGET' derleme basarisiz" - exit 1 - fi -} - -build_package() { - # TODO find a better solution for the hardcoded folders - local BUILD_SUCCESSFUL="yok" - if [ "$1" != "$TARGET" ]; then - if [ ! -z $TARGETS ]; then - for TARGET in ${TARGETS[@]}; do - error "$TARGET should be remove" - done - error "Remove the binaries first..." - exit $E_BUILD - fi - fi - - check_file "$TARGET" - make_work_dir - - if [ "$UID" != "0" ]; then - warning "Packages should be built as root." - fi - - info "Building '$TARGET'." - - unpack_source - - cd $SRC - (set -e -x ; build) - - if [ $? = 0 ]; then - if [ "$PKGMK_NO_STRIP" = "yok" ]; then - strip_files - fi - - compress_manpages - - cd $PKG - i=0 - j=0 - for group in ${PAKET_GRUPLAR[@]}; do - BUILD_SUCCESSFUL="evet" - if [ "`type -t ${group}`" == "function" ]; then - (set -e -x ;${group}) - j=1 - if [ $? = 0 ]; then - BUILD_SUCCESSFUL="evet" - else - error "Building '$TARGET' failed." - exit $E_BUILD - fi - else - if [ "$1" != "$TARGET" ]; then - if [ -f $PKGMK_PACKAGE_DIR/${name}.${group}#$version-* ]; then - rm $PKGMK_PACKAGE_DIR/${name}.${group}#$version-}* - fi - pack_${group} - fi - remove_${group} - if [ "$BUILD_SUCCESSFUL" == "yok" ]; then - error "Building '$TARGET' failed." - exit $E_BUILD - fi - fi - # Add the meta in each package - if [ $j == 1 ]; then - if [ "$BUILD_SUCCESSFUL" == "yok" ]; then - error "Building '$TARGET' failed." - exit $E_BUILD - fi - j=0 - fi - j=0 - done - #dil desteginin eklenmesi-geri kalanın temizlenmesi - #if [ ! "$PAKET_LOKAL" == "hepsi" ];then - # local lokaldizin - # if [ -d usr/share/locale ];then - # lokaldizin="usr/share/locale" - # fi - # if [ -d opt/*/usr/share/locale ];then - # lokaldizin="opt/*/usr/share/locale" - # fi - # for DIR in `ls $lokaldizin` ; do - # if [[ "$PAKET_LOKAL" == *"$DIR"* ]]; then - # echo $DIR "dil paketi ekleniyor" - # else - # rm -rf $lokaldizin/$DIR - # fi - # done - #fi - - if [ "`ls|wc -l`" != "0" ]; then - bsdtar -r -f $PKGMK_PACKAGE_DIR/${name}#$version-${PKGMK_ARCH}.${PKT_UZANTISI} * - else - error "No files found in $PKG..." - exit $E_BUILD - fi - if [ $? = 0 ]; then - BUILD_SUCCESSFUL="evet" - if [ "$DOSYAIZLEME_YOKSAY" == "evet" ]; then - warning "dosyaizleme pas gecildi." - else - check_footprint - fi - fi - fi - - if [ "$BUILD_SUCCESSFUL" = "evet" ]; then - - if [ "$1" != "$TARGET" ]; then - get_package_list - if [ -z $TARGETS ]; then - error "Paket(ler) bulunamadı..." - exit $E_BUILD - fi - for TARGET in ${TARGETS[@]}; do - - add_meta_files $TARGET - add_meta_to_archive $TARGET - done - else - add_meta_files `basename $TARGET` - add_meta_to_archive `basename $TARGET` - fi - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - remove_work_dir - fi - else - if [ -f $TARGET ]; then - touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null - fi - error "'$TARGET' derlenmesi başarısız." - exit $E_BUILD - fi - - - - - -} - -install_package() { - local COMMAND - get_package_list - if [ -z $TARGETS ]; then - error "kurulacak paket bulunamadı..." - exit $E_INSTALL - fi - for TARGET in ${TARGETS[@]}; do - if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then - info "kuruluyor '$TARGET'." - - if [ "$DERLE_KUR" = "install" ]; then - COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" - else - COMMAND="mps -k $PKGMK_PACKAGE_DIR/$TARGET" - fi - - cd $PKGMK_ROOT - echo "$COMMAND" - $COMMAND - - - if [ $? = 0 ]; then - info " '$TARGET' basarili sekilde kuruldu." - else - error " '$TARGET' kurulum basarisiz." - exit $E_INSTALL - fi - fi - done -} - -paket_kur() { - local COMMAND - get_package_list - if [ -z $TARGETS ]; then - error "kurulacak paket bulunamadı..." - exit $E_INSTALL - fi - for TARGET in ${TARGETS[@]}; do - if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ] || [ "`get_package_arch $TARGET`" = "any" ]; then - info "kuruluyor '$TARGET'." - - #paket_kurulum - - if [ "$PAKET_KURMA" = "evet" ]; then - COMMAND2="echo :::::::::::::::::::::::: $PKGMK_PACKAGE_DIR/$TARGET" - fi - - echo "$COMMAND2" - $COMMAND2 - - if [ "$DERLE_KUR" = "install" ]; then - COMMAND="pkgadd $PKGMK_PACKAGE_DIR/$TARGET" - else - COMMAND="pkgadd -u $PKGMK_PACKAGE_DIR/$TARGET" - fi - - cd $PKGMK_ROOT - echo "$COMMAND" - $COMMAND - - - if [ $? = 0 ]; then - info " '$TARGET' basarili sekilde kuruldu." - else - error " '$TARGET' kurulum basarisiz." - exit $E_INSTALL - fi - fi - done -} - -recursive() { - local ARGS FILE DIR - [ -f $REPO_DOSYASI ] && rm -v $REPO_DOSYASI - - ARGS=`echo "$@" | sed -e "s/--recursive//g" -e "s/-r//g"` - - for FILE in `find $PKGMK_ROOT -name $PKGMK_PKGFILE | sort`; do - DIR="`dirname $FILE`/" - if [ -d $DIR ]; then - info "Entering directory '$DIR'." - (cd $DIR && $PKGMK_COMMAND $ARGS) - info "Leaving directory '$DIR'." - fi - done -} -clean() { - unset TARGETS - get_package_list - if [ ! -z $TARGETS ]; then - for TARGET in ${TARGETS[@]}; do - if [ -f $PKGMK_PACKAGE_DIR/$TARGET ]; then - info "Removing $TARGET" - rm -f $PKGMK_PACKAGE_DIR/$TARGET - fi - done - else - warning "$TARGETS bulunamadı" - fi - find $PKGMK_ROOT -name "*.md5sum" -exec rm -v {} \; 2> /dev/null - find $PKGMK_ROOT -name "*.footprint" -exec rm -v {} \; 2> /dev/null - unset TARGETS -} -update_footprint() { - cd $PKGMK_PACKAGE_DIR - if [ -z $TARGETS ]; then - get_package_list - if [ -z $TARGETS ]; then - error "Package(s) not found(s), unable to update footprint." - exit $E_FOOTPRINT - fi - fi - for TARGET in ${TARGETS[@]}; do - if [ ! -f $TARGET ]; then - error "Unable to update footprint. File '$TARGET' not found." - exit $E_FOOTPRINT - fi - PKGMK_FOOTPRINT="`get_package_name $TARGET`".footprint - check_file "$PKGMK_FOOTPRINT" - make_footprint > $PKGMK_FOOTPRINT - touch $TARGET - - info "Footprint updated for $TARGET" - done -} - -build_needed() { - local FILE RESULT - RESULT="evet" - if [ -f $TARGET ]; then - RESULT="yok" - FILE=`get_filename $PKGMK_PKGFILE` - if [ ! -e $FILE ] || [ ! $TARGET -nt $FILE ]; then - RESULT="evet" - break - fi - fi - echo $RESULT -} - -update_collection_repo() -{ - local HEAD BUILD_DATE RELEASE DESCRIPTION URL MAINTAINER PACKAGER EXTENSION - if [ -f $REPO_DOSYASI ]; then - HEAD=`head -1 $REPO_DOSYASI` - if [ "${HEAD:10:1}" = "#" ]; then - BUILD_DATE="`echo $HEAD|cut -d "#" -f1`" - EXTENSION="`echo $HEAD|cut -d "#" -f2`" - VERSION="`echo $HEAD|cut -d "#" -f3`" - RELEASE="`echo $HEAD|cut -d "#" -f4`" - DESCRIPTION="`echo $HEAD|cut -d "#" -f5`" - URL="`echo $HEAD|cut -d "#" -f6`" - MAINTAINER="`echo $HEAD|cut -d "#" -f7`" - PACKAGER="`echo $HEAD|cut -d "#" -f8`" - [ -f ../$REPO_DOSYASI ] && sed -i "/#$name#/d" ../$REPO_DOSYASI - echo "`md5sum $REPO_DOSYASI|cut -d " " -f1`#$BUILD_DATE#$name##$version-#$RELEASE#$DESCRIPTION#$URL#$MAINTAINER#$PACKAGER#$EXTENSION" \ - >> ../$REPO_DOSYASI - fi - fi -} -update_repo() -{ - local FILE MD5SUM EXT - cd $PKGMK_ROOT - get_package_list - if [ ! -z $TARGETS ]; then - EXT="`get_package_extension $TARGETS`" - echo -n "`get_package_builddate $TARGETS`#$EXT##$version-#$release" > $REPO_DOSYASI - for string in desc url maint pack; do - if [ ! -z "`cat $PKGMK_ROOT/$PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`" ]; then - echo -n "#"`cat $PKGMK_PKGFILE |sed "s@^[ ,\t,#]*@@"|grep -i ^$string|cut -d : -f1 --complement|sed "s@^[ ,\t]*@@"`"" \ - >> .PKGREPO - else - echo -n "#n.a" >> .PKGREPO - fi - done - printf "\n" >> .PKGREPO - for TARGET in ${TARGETS[@]}; do - FILE=`basename $TARGET` - MD5SUM=`md5sum $TARGET|cut -d " " -f1` - echo "$MD5SUM#`get_package_name $TARGET`#`get_package_arch $TARGET|sed "s/-//"`" >> $REPO_DOSYASI - done - for FILE in ${name}* - do - [ ! -f "$FILE" ] && break - if [ "${FILE:$((${#FILE} - ${#EXT} ))}" != "$EXT" ]; then - echo "`md5sum $FILE|cut -d " " -f1`#$FILE" >> $REPO_DOSYASI - fi - done - else - rm -f $REPO_DOSYASI - fi - echo "`md5sum $PKGMK_PKGFILE|cut -d " " -f1`#$PKGMK_PKGFILE" >> $REPO_DOSYASI -} -clean_repo_files() -{ - cd $PKGMK_ROOT - if [ -f $REPO_DOSYASI ]; then - rm $REPO_DOSYASI - info "siliniyor $REPO_DOSYASI" - fi - if [ -f MD5SUM ]; then - rm MD5SUM - info "siliniyor MD5SUM" - fi -} -interrupted() { - echo "" - error "Interrupted." - - if [ "$PKGMK_KEEP_WORK" = "yok" ]; then - rm -rf $DERLEME_SANTIYE - fi - - exit $E_GENERAL -} - -print_help() { - echo "usage: `basename $PKGMK_COMMAND` [options]" - echo "options:" - echo " -i, --install build and install packages" - echo " -u, --upgrade build and install packages (as upgrade)" - echo " -r, --recursive search for and build packages recursively" - echo " -d, --download download missing source file(s)" - echo " -cv, --show-version-only do not build, only show the version of the port and exit" - echo " -do, --download-only do not build, only download missing source file(s)" - echo " -eo, --extract-only do not build, only extract source file(s)" - echo " -utd, --up-to-date do not build, only check if package is up to date" - echo " -ur, --update-repo do not build, only update the $REPO_DOSYASI file" - echo " -uc, --update-collection do not build, only update the $REPO_DOSYASI file of the collection means from the parent directory" - echo " -uf, --update-footprint update footprint using result from last build" - echo " -ic, --ignore-collection build packages without update the $REPO_DOSYASI file of the collection means from the parent directory" - echo " -if, --ignore-footprint build packages without checking footprint" - echo " -in, --ignore-new build packages, ignore new files in a footprint missmatch" - echo " -um, --update-md5sum update md5sum" - echo " -im, --ignore-md5sum build packages without checking md5sum" - echo " -cm, --check-md5sum do not build, only check md5sum" - echo " -ns, --no-strip do not strip executable binaries or libraries" - echo " -f, --force build packages even if it appears to be up to date" - echo " -co, --clean-only do not build, only remove packages and downloaded files, update $REPO_DOSYASI file" - echo " -kw, --keep-work keep temporary working directory" - echo " -cf, --config-file use alternative configuration file" - echo " -v, --version print version and exit " - echo " -h, --help print help and exit" -} -parse_options() { - while [ "$1" ]; do - case $1 in - -i|--install) - DERLE_KUR="install" ;; - -pk|--pkur) - PAKET_KURMA="evet" ;; - -u|--upgrade) - DERLE_KUR="upgrade" ;; - -r|--recursive) - PKGMK_RECURSIVE="evet" ;; - -d|--download) - PKGMK_DOWNLOAD="evet" ;; - -do|--download-only) - PKGMK_DOWNLOAD="evet" - PKGMK_DOWNLOAD_ONLY="evet" ;; - -eo|--extract-only) - PKGMK_EXTRACT_ONLY="evet" ;; - -cv|--show-version-only) - PKGMK_SHOW_VERSION="evet";; - -utd|--up-to-date) - PKGMK_UP_TO_DATE="evet" ;; - -sk|--sd-kontrol) - SOZDIZIM_KONTROL="evet" ;; - -uc|--update-collection) - PKGMK_UPDATE_COLLECTION="evet";; - -ur|--update-repo) - PKGMK_UPDATE_REPO="evet" ;; - -uf|--update-footprint) - PKGMK_UPDATE_FOOTPRINT="evet" ;; - -if|--ignore-footprint) - DOSYAIZLEME_YOKSAY="evet" ;; - -in|--ignore-new) - PKGMK_IGNORE_NEW="evet" ;; - -um|--update-md5sum) - PKGMK_UPDATE_MD5SUM="evet" ;; - -im|--ignore-md5sum) - MD5SUM_YOKSAY="evet" ;; - -ic|--ignore-collection) - KOLEKSIYON_YOKSAY="evet" ;; - -ir|--ignore-repo) - REPO_YOKSAY="evet" ;; - -cm|--check-md5sum) - PKGMK_CHECK_MD5SUM="evet" ;; - -ns|--no-strip) - PKGMK_NO_STRIP="evet" ;; - -f|--force) - PKGMK_FORCE="evet" ;; - -co|--clean-only) - PKGMK_CLEAN_ONLY="evet" ;; - -kw|--keep-work) - PKGMK_KEEP_WORK="evet" ;; - -cf|--config-file) - if [ ! "$2" ]; then - echo "`basename $PKGMK_COMMAND`: option $1 requires an argument" - exit 1 - fi - DERLEME_AYARDOSYASI="$2" - shift ;; - -v|--version) - echo "`basename $PKGMK_COMMAND` (cards) $PKGMK_VERSION" - exit 0 ;; - -h|--help) - print_help - exit 0 ;; - *) - echo "`basename $PKGMK_COMMAND`: invalid option $1" - exit 1 ;; - esac - shift - done -} - -main() { - if [ -f /etc/noprofile ]; then - source /etc/noprofile - fi - - parse_options "$@" - - if [ ! -f $DERLEME_AYARDOSYASI ]; then - error "File '$DERLEME_AYARDOSYASI' not found." - exit $E_GENERAL - fi - . $DERLEME_AYARDOSYASI - PKGMK_ARCH=`uname -m` - - - - #if ! (`which pkginfo > /dev/null`); then - #warning "pkginfo NOT FOUND, footprint ignored." - DOSYAIZLEME_YOKSAY="evet" - #fi - local FILE TARGET - - name=`basename $PKGMK_ROOT` - - if [ "$PKGMK_RECURSIVE" = "evet" ]; then - recursive "$@" - exit 0 - fi - if [ ! -f $PKGMK_PKGFILE ]; then - error "File '$PKGMK_PKGFILE' not found." - exit $E_TALIMAT - fi - . $PKGMK_PKGFILE - - if [ -z $group ]; then - group="`echo $name | cut -d "-" -f1`" - fi - if [ "$group" == "$name" ]; then - unset group - fi - if [ -z "$version" ]; then - if [ ! -z "$group" ];then - if [ -f ../$group/$PKGMK_PKGFILE ];then - . ../$group/$PKGMK_PKGFILE - unset run - . $PKGMK_PKGFILE - else - warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." - fi - else - warning "Variable 'version' not initiated or not found in $PKGMK_PKGFILE." - fi - fi - if [ "$PKGMK_SHOW_VERSION" == "evet" ]; then - echo "$version" - exit 0 - fi - info "DERLE_KUR: $DERLE_KUR" - info "PAKET_KURMA: $PAKET_KURMA" - info "DERLEME_SANTIYE: $DERLEME_SANTIYE" - info "DERLEME_KAYNAKDIZIN: $DERLEME_KAYNAKDIZIN" - - if [ "$DERLE_KUR" = "yok" ]; then - PKGMK_CLEAN="yok" - warning "TEMIZLIK PAS GECILDI." - else - info "PKGMK_KEEP_SOURCES: $PKGMK_KEEP_SOURCES" - info "PKGMK_CLEAN: $PKGMK_CLEAN" - fi - if [ "$PKGMK_CLEAN" != "yok" ]; then - DOSYAIZLEME_YOKSAY="evet" - MD5SUM_YOKSAY="evet" - warning "FOOTPRINT AND MD5SUM IGNORED" - else - if [ "$PKGMK_UPDATE_REPO" != "evet" ]; then - info "REPO_YOKSAY: $REPO_YOKSAY" - else - info "PKGMK_UPDATE_REPO: $PKGMK_UPDATE_REPO" - fi - info "DOSYAIZLEME_YOKSAY: $DOSYAIZLEME_YOKSAY" - info "MD5SUM_YOKSAY: $MD5SUM_YOKSAY" - fi - if [ "$REPO_YOKSAY" == "evet" ]; then - info "$REPO_DOSYASI dosyası silenecek" - fi - - info "PKT_SIKISTIRMA: $PKT_SIKISTIRMA" - if [ "$PKT_SIKISTIRMA" != "yok" ]; then - info "PKT_SIKISTIRMA_MODU: $PKT_SIKISTIRMA_MODU" - fi - - info "isim: ${name}" - if [ ! -z "$version" ]; then - info "versiyon: $version" - fi - if [ ! -z "$release" ]; then - info "surum: $release" - fi - if [ ! -z "$group" ]; then - info "grup: $group" - fi - PKGMK_MD5SUM="$name.`uname -m`.md5sum" - check_directory "$DERLEME_KAYNAKDIZIN" - check_directory "$PKGMK_PACKAGE_DIR" - check_directory "`dirname $DERLEME_SANTIYE`" - - check_pkgfile - - get_package_list - - case $PKT_SIKISTIRMA_MODU in - lz|gz|bz2|xz) - if [ -z $TARGETS ]; then - TARGET="$PKGMK_PACKAGE_DIR/${name}#$version-PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU" - fi;; - *) - error "Sıkıstırma modu '$PKT_SIKISTIRMA_MODU' desteklenmiyor" - exit $E_GENERAL - ;; - esac - case $PKT_SIKISTIRMA_MODU in - gz) COMPRESSION="-z" ;; - bz2) export COMPRESSION="-j" ;; - xz) export COMPRESSION="-J" ;; - esac - - if [ "$PKGMK_CLEAN_ONLY" = "evet" ]; then - clean - remove_source - update_repo - exit 0 - fi - if [ "$PKGMK_UPDATE_COLLECTION" = "evet" ]; then - update_collection_repo - exit 0 - fi - if [ "$PKGMK_UPDATE_REPO" = "evet" ]; then - update_repo - exit 0 - fi - if [ "$PKGMK_UPDATE_FOOTPRINT" = "evet" ]; then - update_footprint - exit 0 - fi - - if [ "$SOZDIZIM_KONTROL" = "evet" ]; then - update_collection_repo - info "description: $description" - info "url: $url" - info "packager: $packager" - info "maintainer: $maintainer" - exit 0 - fi - - if [ "$PKGMK_UPDATE_MD5SUM" = "evet" ]; then - download_source - check_file "$PKGMK_MD5SUM" - make_md5sum > $PKGMK_MD5SUM - info "Md5sum updated." - exit 0 - fi - - if [ "$PKGMK_DOWNLOAD_ONLY" = "evet" ]; then - download_source - exit 0 - fi - - if [ "$PKGMK_EXTRACT_ONLY" = "evet" ]; then - download_source - make_work_dir - info "Extracting sources of package '${name}-$version'." - unpack_source - exit 0 - fi - - if [ "$PKGMK_UP_TO_DATE" = "evet" ]; then - if [ ! -z $TARGETS ]; then - for TARGET in ${TARGETS[@]}; do - if [ "`build_needed`" = "evet" ]; then - info "Package '$TARGET' is not up to date." - else - info "Package '$TARGET' is up to date." - fi - done - else - if [ "`build_needed`" = "evet" ]; then - info "Package '$TARGET' is not up to date." - else - info "Package '$TARGET' is up to date." - fi - fi - exit 0 - - fi - # From here on it's need to check the base package not any group which means - if [ -z $TARGETS ]; then - TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI.$PKT_SIKISTIRMA_MODU - if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then - info "Package '$TARGET' is up to date." - else - download_source - derle - fi - else - FOUND=false - for TARGET in ${TARGETS[@]}; do - if [ "`build_needed`" = "yok" ] && [ "$PKGMK_FORCE" = "yok" ] && [ "$PKGMK_CHECK_MD5SUM" = "yok" ]; then - if [ "`get_package_arch $TARGET`" = "$PKGMK_ARCH" ]; then - FOUND=true - fi - info "Package '$TARGET' is up to date." - else - download_source - derle - break - fi - done - fi - if [ ! -z $FOUND ] ; then - if [ $FOUND != true ]; then - download_source - PKGMK_BUILDVER="`get_package_builddate $TARGET`" - TARGET=$PKGMK_PACKAGE_DIR/${name}#$version-$PKGMK_ARCH.$PKT_UZANTISI - derle $TARGET - fi - fi - if [ "$DERLE_KUR" != "yok" ]; then - install_package - fi - if [ "$PKT_SIKISTIRMA" = "evet" ]; then - cd $PKGMK_PACKAGE_DIR - get_package_list - for TARGET in ${TARGETS[@]}; do - if [ "${TARGET:$((${#TARGET} - ${#PKT_UZANTISI} ))}" == "$PKT_UZANTISI" ]; then - compress_archive $TARGET - fi - done - fi - if [ "$PKGMK_KEEP_SOURCES" != "evet" ]; then - remove_source - fi - if [ "$PKGMK_CLEAN" != "yok" ]; then - clean - unset TARGETS - if [ "$REPO_YOKSAY" == "evet" ];then - clean_repo_files - fi - fi - if [ "$REPO_YOKSAY" != "evet" ] && [ "$PKGMK_CLEAN" != "evet" ]; then - update_repo - fi - if [ "$KOLEKSIYON_YOKSAY" != "evet" ]; then - update_collection_repo - fi - exit 0 -} - -trap "interrupted" SIGHUP SIGINT SIGQUIT SIGTERM - -export LC_ALL=POSIX -DERLEME_AYARDOSYASI="/etc/mpsd.conf" -readonly PKGMK_VERSION="1.0" -readonly PKGMK_COMMAND="$0" -readonly PKGMK_ROOT="$PWD" -PKGMK_PACKAGE_DIR="$PWD" - -PKGMK_BUILDVER=`date +%s` -#PKGMK_BUILDVER="#" - -PKT_UZANTISI="mps" - -REPO_DOSYASI=".PKGREPO" - - -PKGMK_PKGFILE="talimat" -PKGMK_MD5SUM="$name.`uname -m`.md5sum" -PKGMK_NOSTRIP=".nostrip" - -PKGMK_KEEP_SOURCES="yok" -PKGMK_CLEAN="evet" -PAKET_KURMA="evet" - -PAKET_GRUPLAR=() -PAKET_LOKAL="tr" - -PKGMK_SOURCE_MIRRORS=() -DERLEME_KAYNAKDIZIN="$PWD" -DERLEME_SANTIYE="$PWD/work" -PKGMK_DOWNLOAD="yok" -DOSYAIZLEME_YOKSAY="evet" -PKGMK_IGNORE_NEW="evet" -MD5SUM_YOKSAY="evet" -SURUM_YOKSAY="yok" -REPO_YOKSAY="evet" -KOLEKSIYON_YOKSAY="evet" -PKGMK_IGNORE_RUNTIMEDEPS="evet" - -PKGMK_NO_STRIP="yok" - -PKT_SIKISTIRMA_MODU="lz" - -PKT_SIKISTIRMA="yok" - -DERLE_KUR="yok" -PKGMK_RECURSIVE="yok" - -PKGMK_DOWNLOAD_ONLY="yok" -PKGMK_EXTRACT_ONLY="yok" -PKGMK_IGNORE_UNPACK="yok" -PKGMK_UP_TO_DATE="yok" -PKGMK_UPDATE_FOOTPRINT="yok" -PKGMK_FORCE="yok" -PKGMK_KEEP_WORK="yok" - -PKGMK_UPDATE_MD5SUM="yok" -PKGMK_CHECK_MD5SUM="yok" - -main "$@" - -# End of file diff --git a/mps-0.8/mpsd.conf b/mps-0.8/mpsd.conf deleted file mode 100644 index 3b3f508bd..000000000 --- a/mps-0.8/mpsd.conf +++ /dev/null @@ -1,31 +0,0 @@ -export CFLAGS="-O2 -pipe" -export CXXFLAGS="${CFLAGS}" - -case "`uname -m`" in - "x86_64"|"") - export MAKEFLAGS="-j5" - ;; - "i686") - export MAKEFLAGS="-j2" - export CFLAGS="${CFLAGS} -m32" - export CXXFLAGS="${CXXFLAGS} -m32" - export LDFLAGS="${LDFLAGS} -m32" - ;; - *) - echo "bilinmeyen mimari..cıkılıyor." - exit 1 - ;; -esac -DERLEME_SANTIYE="/tmp/work" -DERLEME_KAYNAKDIZIN="/sources" -PKGMK_SYNC_FILES="yok" -PKT_SIKISTIRMA="evet" -DOSYAIZLEME_YOKSAY="evet" -PKGMK_UPDATE_INDEX="evet" -PKGMK_KEEP_SOURCES="evet" -MD5SUM_YOKSAY="evet" -PKGMK_CLEAN="yok" -PAKET_GRUPLAR=() -PAKET_LOKAL="tr" -KOLEKSIYON_YOKSAY="yok" -SURUM_YOKSAY="yok" diff --git a/mps-0.8/onmpsd.conf b/mps-0.8/onmpsd.conf deleted file mode 100644 index 82856d62e..000000000 --- a/mps-0.8/onmpsd.conf +++ /dev/null @@ -1,32 +0,0 @@ -export CFLAGS="-O2 -pipe" -export CXXFLAGS="${CFLAGS}" - -case "`uname -m`" in - "x86_64"|"") - export MAKEFLAGS="-j5" - ;; - "i686") - export MAKEFLAGS="-j2" - export CFLAGS="${CFLAGS} -m32" - export CXXFLAGS="${CXXFLAGS} -m32" - export LDFLAGS="${LDFLAGS} -m32" - ;; - *) - echo "bilinmeyen mimari..cıkılıyor." - exit 1 - ;; -esac -DERLEME_SANTIYE="/tmp/work" -DERLEME_KAYNAKDIZIN="/sources" -PKGMK_SYNC_FILES="yok" -PKT_SIKISTIRMA="evet" -DOSYAIZLEME_YOKSAY="evet" -PKGMK_UPDATE_INDEX="evet" -PKGMK_KEEP_SOURCES="evet" -MD5SUM_YOKSAY="evet" -PKGMK_CLEAN="yok" -PAKET_GRUPLAR=(devel service) -PAKET_LOKAL="tr" -KOLEKSIYON_YOKSAY="yok" -SURUM_YOKSAY="evet" -PAKETSIZ_DERLEME="evet" From e4371d5efddbb42ec57e385890e1a33ff6ebdc6e Mon Sep 17 00:00:00 2001 From: milisman Date: Wed, 8 Feb 2017 21:08:21 +0200 Subject: [PATCH 18/20] mps-dota.ipv6-destegi --- bin/mps | 12 +++++++++--- iso_icerik/boot/grub/efiboot.img | Bin 16777216 -> 16777216 bytes 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/mps b/bin/mps index 6c339fd12..ebba9fe67 100755 --- a/bin/mps +++ b/bin/mps @@ -4,7 +4,7 @@ if [ -f /etc/mps.conf ];then . /etc/mps.conf fi . /root/bin/fonks.sh -versiyon="0.8.7" +versiyon="0.8.8" iletisim="milisarge@gmail.com" paketdepo="/depo/paketler/" if [ -z ${sunucu+:} ]; then @@ -719,7 +719,13 @@ dosyadan_talimat_islem(){ then ryaz 32 "talimat linkten cekilecek" gdosya=`mktemp` - wget $dosya -O $gdosya + wget $2 $dosya -O $gdosya + dosya=$gdosya + fi + if [[ $2 =~ "-6" ]]; then + ryaz 32 "talimat linkten cekilecek" + gdosya=`mktemp` + wget $2 $dosya -O $gdosya dosya=$gdosya fi if [ ! -f $dosya ];then @@ -1185,7 +1191,7 @@ ayarlar() { -suko) sunucu_kontrol ;; -dota) - dosyadan_talimat_islem $2 ;; + dosyadan_talimat_islem $2 $3 ;; -cf|--config-file) if [ ! "$2" ]; then echo "ayardosyası gerek $1" diff --git a/iso_icerik/boot/grub/efiboot.img b/iso_icerik/boot/grub/efiboot.img index c46b7732fbafc6ebf0c41e5862b1de6317aed484..6b375ee8fe7a83e4cb9412ab9ba3614ce42433bc 100644 GIT binary patch delta 10852 zcmai4eS8*Gb`B9Nut4~D5rY9EppY+|dEc3N^FM*F+6=T$AKX>cv+Mc1vv=f=+)`6lQS*Q%b@acwwQ=F71%5jQ|3BN)@of9WhL+9lBj004T3Ypj)5K{s~SgpRyjV_Rh4{f!pGkw z+p|`+4fdAsYtfQq$FQ8~gOYtyRxKS7SYxPq%sncjfE{(P&>m-6J$aHrnr84-*R4uS z4ek-u4R?>X%Ob6&^_eF9-@2~w|NE^NJ7Ykze`Q+fF=-WC&M!^Y4vwW%)0$QxtfM|^Q)iE8x^oxSK^9mbwe{-(>wpvB-oxW?-Vyw zch$SI9NY8lOw-B@_(zY*p3cupO*gIf9BD5jDrk1k>O@Y!9?cLmJLN>8b9G}dT5$xz zwWhp~S+je!pBPTm4JFFg-1;zE(=(e9@w{w{W{BH=Sk6}2In0kosw9iGSd9CK#l+0m zSUEg-9J#+i+A5BJT+^R!h|Gp_W=p>#{M_tE9!X>boTGab z+griRT@K*T}D^h<4vouNM5B0`V@6d8Im1F-0)K-*;h6rb;z`uR8ybLQdl3xw-1LLCMtQs=g~tYg4^+Gu+N#;@2bwPuUO_dwT~}QSHjM~)JFZB9`Qk|yn2BqbgxF%}+_0Rri5r7%Qbl}; zOZ#F>glsuqwV23xGU-A?$^rq(WjDoyRMB4bEq>8+sv%g(ttl^z;G|r^H>#FVA!MW< z`Lpdj(;6OF71R0UU(aK1JP;d$~RWlC_H>M|X;eqD;L+=Nud9b6R+hEK!9eAC^a;nVLu(`aLEH ztye~1#T$izn+OGaxt`hjW}$tLX?45X;@AKjM*ymolc5-oth&%qaO7q9<7PR`AO8x9Vkl0&EDgAJcVghRJ0JU z=S6DK(unrR{arA4&!dS{z%P1C`0m?WhbzUB=h4n`L82C{vzWzay=Y_T3@xs^ymZR_ z;mp!u$=6=mu-MmGy2gk;gbMB94UN9C<*pG8@sL)BI2%H)L4U#BOWoD!4HpTyD1Q^` zS;6TH5L8z{oD5J|7ve{CttSz(OpggErXK!4 zBIIdZ7l}h6din;t+_atzNKP!y<1wTy?8~^$TR4jPA7`^lyh)~-uDL1U4kr0+ZRvra zU;_c3gugiHDTb`gq))XId*|wj#8;%T@|)cU$<{ns73e>;2(1AR!L~ zsm1vMI|qT7B?VTGiwbit>>6DYIZloFKrRbrzaj6Ti#^^p*uAqv@uhpCD|c_?_OFkH z(@KeQYpG`T7N^i{*U5V9qam%DTXNxPv$wxKpgE%0Qz!gRJ*(1pi)oas@-+9J8dh7| zy&C)|#&JJ5iO|QO`UxR&b?KC6GYWRsj zDl3AdOzBz=y-^KZmpt^w_4cc#wIbm0n6Qo#e`TqC%(NbpQ&m$%T*#Z7s!|Y zw<#o_##NroBpuU=?Gn?<7juKVN^qb+jbxZsuNb)9$cP4XZ$+d4-C3>7=~#@%mxSe( zTGq={2C7$FbXIih>KK!s!dz)DM3{SU-Bvb|7w4XuYFe+%l~zITIagk8PYetC#_JZH z8m63K4Xjdg4gtGQ-Ut(uYH$WieB|`Ldhhn&`j_R95X4IxXGd zptAx*y1QekudybFYr+W`1>>(aduPrFB&}#}NbPrYgqs_$HKa9{&b4pEvzKhM9uwvM zyNKSO{v-wP0ik7$(ahp=OJ|#&3Hb&aa>3LLuUIoEfdVW zr6mve^9Y5S^X<2tiID-mVesHt_IV4N;I|gMKgQhmgZh=y9=d3lNNNAn8PYc+Dl&

BL&EcA7D11b9G9bGz2N}>*a4yrFIPUrpX7v?$*&Y2;%|Dzj&(6en znWl>OPB-J-8@UDiM-}5oqwx)l4e`Ju%C<_D6}JZ(e(&9oBHLKT3QT%|l+ef>?%?g4 zLp;P&0sZQl^TC|U(#_u0iWGKT6FN@%^33KiSv^8i!}ZeUPz=ygNQdn%93L^Q>jO={ zAx0+0!5IR>YD5Tbf1&}uJMz*+CqJ@C!o%58BIAOl1GO(oPmmNke#l_ zg?yBE`QON#xS=27ZlsCkgZXF5&2Fu7q`5bdFHsu8$Cr{?b#{fRrU*r&v1Mmhm}*|< zN&7t8)#!UMam+Fd(H_uP_d=x&Q6DXrZH$JT*i@{>RFSTl~-Pjy(`Ju1M6&ey}C%Y>(sA6`#Mz8gHPYvkodLOtsI-7D1MI_-Qm- zu{D$lK2ct`HF0%N^>m>zB<#=3Vv^k?zfeFMxnz?y%jTrm02k=2qhhe4Sai)|eN#k^ zg%)*b$gEu<7^1Gt~^w)wx0P|C)H9?=esm8_PWlzSR*fR|$u`S&WA+3&~+pzGo!8njN< z*grI_OM^p{s=Gd-p=4+Y`}Xs(F2x>?nB3d+X!wbqI%D=0%A=O%y&gEMd+syFx)I$= zf^w;&r*aP^vXstB;WbE;OOUTAUD_R*xpZ$*qSo#1?hr}zsOW*H+Zdb23i#ka{fdi8 zomlYrMRwA}1VM#jM|X&BMpTq|a^?OicG`XNTV>q)4ogbVRPMZs%5QS`I?AUXDk!hy zutaH+=Nj;UD=HCTnQAXV@B-T7eQCXOdpL2uDU5vd(Dslj`#w*!^{|;GvEBcvk*KQ+ z>QWn2rZS6{$!)NqiW+c#Z3NzF3W$s%1cI3H@%E*`ufo2Do9f6{+e69@V|bd8mmjZ5 zjWK(_o*w9^L_wagBas=Acp%hLcCE#-gy{bM zhfPkm%x0xHBI{n@LBo9Fce8NdWrYK%Iy+<*;d>EJTN2XucZAs=!yh)VzffRb{Mn(O z?FexeFK=8TY0bepTgP|6KsoW|&73F0&8s3V&-~QdH~-pX-+U#7cZ#o3KmG|A7lBi`@cmh|1bkLeaEvwfjg1i+Y9d)eF?F!utZsZiAIsEX& z)`+xzYgdRszQ4R6={OzULH9m>QBQDUE_<2&S|$)$eolGvuY0wGtqy_7l=!)tt{ zhlKT--64`0-iI`Y9@oCAB3m!i4LpMH#lb#Z=nQ39SpzHB6|&~zyAP)k8DHsW{sox= znBI8ikKB{c1DXX_^2?F#ou6wjHLV(X#=;_=XLM3sC96RP0?zcBkr(H%$>1qj%YFGn zj{Ia#*x9PkAadl9>0j#R{wXE=?}{jaVljRvn)s)cID>XDUxlUO0(SvF1nvgz0e%GB3)~0%1<(ZiC9n**A6O3j6|e&MF|ZPN0C*7i z3Gfi`Ft7^vDXLG3HTZCIPe6}4s-yW zz-FKe*aBcYdV#&bKHwL?e&A`~8Q_<| zv%s%_=YZ#d7l6M74gfC#2Z1Ee2OI)k0$v7Q0e%hq26z=X47>&$0sam+3LFED1Fr)o zfWHUc0R91Z6Zl8qpMbZ3e&B839pImVlfb*cd%(W{?*pfR4}jkSr-2WFe+51QJ_gPJ zp8#ipPl0p5XTayc0Pt_XdEj?|4Wxhz!0&-CfG>fsfPV-60Q?8=N8mq!uYvypz5%`k R{u}ro;7|A)zVDWw{a^52&V2v? delta 11159 zcmai3dw5k&!1Ax{#LOA-RZP&*P7$d3jWmAHROhWhV+_$ zCj6cLb(b~fU!FFW%{(+V`}g3S?HdQ>HVMIt0!78eN>6S?5g$}Nefq5bH`!(`-ACS|Z?9fcW~8rKHuICQZHM-(?EPBKn74+;ZOgGu zrA11<&n0|S78z#!lR{?bN+OiOaLF^qiLzLT1ub2i{jhLODr)g6s8}rlf3kq^(?V^TQ-{ z@ihNZ*SpXxq|9VO9r$H)ti<)|E9LK&c2u`PT2ht%P}j3{(D*FeE_6ZP(u&^cL#0K( z#aXKggf2T_s&5Sukx-#!i_g{j6J76|)MDDUy8VLuyxwl>n3{g+uJZ-m zm%HAXMxoHO3@0?}nJO~=Y$L_5{u_=`#y3ohA#!VLg%-;Y2c|pL)n=}Az1PZxlxZiF zmKAGn?43Tiv;2c`t~Xa_Z{R4?iuW`=-7&8vGu8EGMozR6J*C`j-!I1%XVsn@;I^MI z9taaXP>55xywh#nM(i5btIQW>S%#^8=M=8ar{o+`Dy2+E<;n|%d^lu9O* zJ2@A&nf`FsTN8<5BB^wJ*-W~gt@ja{Iguz@31!zU1(XY2ljT{a&V^g6Nz0zef4Ith zrNgph+jN7-@hr!OkW_9qhl z4_t3swUDxq?x8^|YDsE)HC6GvNWwr_C>7jr-bHl7+iFi-jq<6H3X?k2?6UJU!Q&-0G z&rlUUt64Tkbj#HB#VotFA_J#?W=5Q@6JoqYXZa@G?&BtL7OGH1nROj$BB`?xQZo!i zN5^f_b*_lgJtgh7Y(uy{cWVJ^wXv!jSKKBYVcNP@S>g5qa%w-R&`fI5`gA#QY5%Ij zL*18OtG!=jzN3%5rx$)Ce=kb*dIF7Pj*K# z(a^dEC+Ni2tI280E$P}UM^FK+?p$f5J6GC%p6ktu(5_*r`k;omx^wolbm#0wztHs# zNROZ?s&MgL4_1-iQg!lVM|Z`-b;Ky6bZg}VN+y&qI9W$e$)MiGN*cGaos8=(x14Ud zvq7F^X1ZJDUoWL>TQfjjL+oZSfJ`vc)cNqeC9zvvuT>8zfyJh+8G`%#nlkdv zmO^2Rm9Ug|cx2dGNZfryk1~9FLvuHm{jp*ypGWdUCZJoWWWM>~7_@AZ`2>p<8?g^J zRc5MOZ&Jh}M`tkmu)NSm!`w4L*bQQnn}me8x5SVu?TA^_m?i)pKB-)jQqY;&h>FcInBFqnOYn_|jvs zjO%sC@xronO)=H(YN6~MB0Xb8I0q;iy{kfdR+`+XBN zitF?&6a0?%j;eDe_v=e({>asBkfjWLR?sou@QVAUe|>Gusp+owUY<0|(eC0hd_T{h z;d*!IVr7MXBb-l8CXrdtAQF+we2 zefm`+VyG!S`vyXGT=OeuLQ6hnaBDo`0X?2Dr>%)+7P{V2o#$+jt!Kz(^%UNG=^@N% zDsY@61x5aV=RDm)*=k!ivLG&>bmkx~In}4iFth6FV^KWedrWlc%Ae)z9@=(jjN5vC z`AE0DNY9!q?Py*I6wmv*d|-NSaq<|N{l|JjV$p=2a2GyGMRvp_(wd}+hNY7Fx=d~5 z$&BN+Z_(`{kg`o(iZw-~Yik}+Td|BdCV8ftFjhwGh#brfGIuZ=sjB8EtZd9&f-a_C z1>rs8%F8TuY;xvC*Lz*hS%H*;HWm7gbGoa59{02KKp9A(lw>!UT|qpNk_D&7&d~Tq zhm7B=9~kThTkkBGQ1_YCf>RMkx z+RHUWr3Fzc)ei!WOwm-Dxu-;uEUEV!tgEhtTyS1DeZE~>xAQM5V<`K(>5AD0V0-i6Lm^k+YB|;q5tlD@!SRn`OH}hfo&r zE3PGx>Fc&{ObLrHTBrnIU7J$=2-ka8zi|SKu#Zv}F^Rlq6ZKstc^i*GmA>5Ih7^-0 zmrjyYlZ-3tIRlnY%Dm-zrlcCna+LKfW!GmKT(hL7vxjzov9^HjFeJVLXY-5 z5R9s&JMPz`F?&7RQu$$jUfhFIpPcNx&fz^)AIxaddhGaAa&qadY9cZ? z8yOmGZ9S9NxfC_#d6C9!>4f4$zs>S7rraR?iBwUZU}Bk6MMZO0r1Qr0{2WBt_){gK zyeQs{ixy26m4hv$QaI?Pm<8kYNXxmGZI^7;xd~K%>tvI$G5Ln(7^MKtT(g_Rc~})y5mqV>JO2|V|S_C$uII@DN4pl=`Jv{daG5{ z#Smaa&L?K}vjR7liN{>{KppvWZiM0;-Sls*rl>q5O94JmSPCq)y*L9F{8(mFkIf9*b)=Ad zFi@r^bSb-7*JTq)*A_X3*zvfM;u76zQ>xd?;gPr~w2O-?HJLUq`()R^T1xd6CZPSn zhJKi|9#>RSWS2Ym_UiuWJ+Z>$Xnac|$AZ$rV}CR`2B%(-uE(A$8z3r(uc|XBzIr+P zVVSJ7Ojs8C7QW_049c$Y*#&0{gPFEjRC|xHo~7!VsjQl18^e-7hPlO}&GqY%H@%@- zHMPXmon2+X4e8FV8~rz2uSFI#7+W}O`uKdj?q;S=HM!m~8BMHdRCOG;V^zq)d~peM z2=zNZzY6l{5+@?$p42rKM94Tw{qtmbH$uKjmNslti4lly+d~}qc;(5<-S)~dF&6jO z)o}Z(E~7fRHgef)4vkBV7>-4JjnEQtM!LhV$$(2*zcF|!m$glyedA$S*+>Z$CJyF@ zRpf^~l0_^_kLb*Sd+YoKU`iSCZ+t6CSX3KxqCV9vh3Brh>1^B z$Eph2G0l;=&||U3y5?5WFndteY>#&jr@=eb^zC$cu3u40GymAA3-q}7^@}k) z)z?WP#U@f(yuLUCM}8&UZ5evcK-s&aBSpo!Mm~(uy_6$)7Jjyd7;ZwK= zB8SMS2VALq#x*glfTsB(=?#2BRy~nBesQp=-!D@X2dXQ+T@m{>UTTqqLEeR}WN;Jp z`W*THO-t`~*p@yO{&d&-FjB>aURiupPE%8VX)Crmig#Gcz-D^I+!k?kcGuw*|^MgZ=Z*ZKKm(}6>jJH`n zV6bXYcJt@WEsg$EtdJtfmfhU1SR2DUbs|Cl*%3TAEC1D;dBfWdJrwR1b1ab~I8()y zz0fCk@fFCK!py!4dGaW#C%QNgsnP6Omr3PdjgJ-A7@4{teU$?|H;t`2J=ooR$7J!2 z#)nsxl{~H9IXPJ0L@5}1wF|LJ^ax+Z;37OHD@Kuy}X=K(?Ebom( zJp0PIuZBKooR_Q99(m8%b;0!eV*euTb{y?9o>=D;()Yc+lH1K}`{NwkSK@oFcd?Yh zZbEsMXNrC$#Adk>&NKA><(^`y>T3%=!0j%U5l1UkdGqOVYJYdj(BOAfuRJF#u0C4f zt{**PdC%HUS`K?Mpz77FV`cy|fo}n`fNuk{fjrNA;^Ij{m)2|Na@0#*Z$13w0y0R9?y68H)56!0|A3bX-hfM55SHL#l zRbV^tcff1F4qzvc20DOFU>ETBz;58z!0W&pKo{^Pum|`DU@!0%un+i0U_bCSZ~*ux z;2`kNz&pTifJ4B)0Ph0-3cLsW7I+`{H{dYv0q`O45%4?U-+_;TPk3HU$;_#F5>@CV>D@JHakfHS~<180Fh0q21K0nP(o02hESfv?i7 KW4>N|{C@$0b Date: Wed, 8 Feb 2017 22:16:39 +0200 Subject: [PATCH 19/20] arc-theme.paketlendi --- talimatname/genel/arc-icon-theme/talimat | 16 ++++++++++++++++ talimatname/genel/arc-theme/talimat | 16 ++++++++++++++++ talimatname/genel/faba-icon-theme/talimat | 17 +++++++++++++++++ talimatname/genel/moka-icon-theme/talimat | 17 +++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 talimatname/genel/arc-icon-theme/talimat create mode 100644 talimatname/genel/arc-theme/talimat create mode 100644 talimatname/genel/faba-icon-theme/talimat create mode 100644 talimatname/genel/moka-icon-theme/talimat diff --git a/talimatname/genel/arc-icon-theme/talimat b/talimatname/genel/arc-icon-theme/talimat new file mode 100644 index 000000000..c23140e46 --- /dev/null +++ b/talimatname/genel/arc-icon-theme/talimat @@ -0,0 +1,16 @@ +# Description: Arc teması için gerekli ikon teması (deneme aşamasındadır). +# URL: https://github.com/horst3180/arc-icon-theme +# Packager: yasarciv +# Depends on: gtk-update-icon-cache hicolor-icon-theme moka-icon-theme faba-icon-theme + + +name=arc-icon-theme +version=20161122 +release=1 +source=(https://github.com/horst3180/$name/archive/$version.tar.gz) + +build() { +cd $name-$version + ./autogen.sh --prefix=/usr +make DESTDIR=$PKG install +} diff --git a/talimatname/genel/arc-theme/talimat b/talimatname/genel/arc-theme/talimat new file mode 100644 index 000000000..07a5918f0 --- /dev/null +++ b/talimatname/genel/arc-theme/talimat @@ -0,0 +1,16 @@ +# Description: GTK 3, GTK 2 ve Gnome-Shell için şeffaf öğeler içeren düz bir tema. +# URL: https://github.com/horst3180/arc-theme +# Packager: yasarciv +# Depends on: gtk3 gtk-engine-murrine arc-icon-theme + + +name=arc-theme +version=20161119 +release=1 +source=(https://github.com/horst3180/$name/archive/$version.tar.gz) + +build() { +cd $name-$version + ./autogen.sh --prefix=/usr +make DESTDIR=$PKG install +} diff --git a/talimatname/genel/faba-icon-theme/talimat b/talimatname/genel/faba-icon-theme/talimat new file mode 100644 index 000000000..f47762966 --- /dev/null +++ b/talimatname/genel/faba-icon-theme/talimat @@ -0,0 +1,17 @@ +# Description: Faba, Tango etkileri ile seksi ve modern bir simge teması. Faba için tüm varyasyonlar ve ek temalar, bu temel temayı gerektirir. Faba Icon Teması, GNU LGPL-3.0 + veya CC-BY-SA-4.0 şartları kapsamında dağıtılır +# URL: https://github.com/snwh/faba-icon-theme +# Packager: yasarciv +# Depends on: gtk-update-icon-cache + + +name=faba-icon-theme +version=4.1.2 +release=1 +source=(https://github.com/snwh/$name/archive/v$version.tar.gz) + +build() { +cd $name-$version + bash autogen.sh --prefix=/usr + make + make DESTDIR=$PKG install +} diff --git a/talimatname/genel/moka-icon-theme/talimat b/talimatname/genel/moka-icon-theme/talimat new file mode 100644 index 000000000..1088cc34d --- /dev/null +++ b/talimatname/genel/moka-icon-theme/talimat @@ -0,0 +1,17 @@ +# Description: Moka, net, basit ve tutarlı olacak şekilde tasarlanmış, stil sahibi bir Linux masaüstü simge setidir. Moka Icon Teması (simge varlıkları ve kaynakları) bir Creative Commons Attribution-ShareAlike 4.0 lisansı altındadır. +# URL: https://github.com/snwh/moka-icon-theme +# Packager: yasarciv +# Depends on: gtk-update-icon-cache faba-icon-theme + + +name=moka-icon-theme +version=5.3.5 +release=1 +source=(https://github.com/snwh/$name/archive/v$version.tar.gz) + +build() { +cd $name-$version + bash autogen.sh --prefix=/usr + make + make DESTDIR=$PKG install +} From 83f7b936b8d1be5603a15b87ff1194ffae8603fe Mon Sep 17 00:00:00 2001 From: milisman Date: Thu, 9 Feb 2017 12:49:13 +0200 Subject: [PATCH 20/20] moka-ikon-seti.ayirildi --- talimatname/genel/arc-icon-theme/talimat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/talimatname/genel/arc-icon-theme/talimat b/talimatname/genel/arc-icon-theme/talimat index c23140e46..46bd281a8 100644 --- a/talimatname/genel/arc-icon-theme/talimat +++ b/talimatname/genel/arc-icon-theme/talimat @@ -1,7 +1,7 @@ # Description: Arc teması için gerekli ikon teması (deneme aşamasındadır). # URL: https://github.com/horst3180/arc-icon-theme # Packager: yasarciv -# Depends on: gtk-update-icon-cache hicolor-icon-theme moka-icon-theme faba-icon-theme +# Depends on: gtk-update-icon-cache hicolor-icon-theme faba-icon-theme name=arc-icon-theme