talimat 1.1 KB

12345678910111213141516171819202122232425
  1. # Tanım: İşlem tabanlı ağ emülatörü
  2. # URL: https://github.com/mininet/mininet/
  3. # Paketçi: Cihan_Alkan
  4. # Gerekler: help2man python-setuptools python pynetworkx net-tools iputils iperf openvswitch
  5. # Grup: ağ
  6. isim=mininet
  7. surum=2.2.1
  8. devir=1
  9. kaynak=(https://github.com/mininet/mininet/archive/$surum.tar.gz::$isim-$surum.tar.gz)
  10. derle() {
  11. cd $isim-$surum
  12. grep python Makefile
  13. grep -rIil '#!.*python' . | xargs -n1 sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:g'
  14. grep -rIil '#!.*python' . | xargs -n1 sed -i 's:#!/usr/bin/python:#!/usr/bin/python2:g'
  15. sed 's:BINDIR = /usr/bin:BINDIR = $(DESTDIR)/usr/bin:g' -i Makefile
  16. sed 's:MANDIR = /usr/share/man/man1:MANDIR = $(DESTDIR)/usr/share/man/man1:g' -i Makefile
  17. sed 's:install $(MNEXEC) $(BINDIR):mkdir -p $(BINDIR); install $(MNEXEC) $(BINDIR):g' -i Makefile
  18. sed 's:install $(MANPAGES) $(MANDIR):mkdir -p $(MANDIR);install $(MANPAGES) $(MANDIR):g' -i Makefile
  19. sed 's:python setup.py:python setup.py install --prefix=/usr --root="$(DESTDIR)" --optimize=1:g' -i Makefile
  20. make DESTDIR="${PKG}" install
  21. }