DEV Community

Cover image for DEB Paketi Oluşturma
Doğukan Eren for Açıklab

Posted on • Edited on

4

DEB Paketi Oluşturma

Bu yazımızda oluşturduğumuz scriptleri nasıl deb paketine dönüştürebileceğimizden bahsedeceğiz.

1-Scriptimizi Hazırlama

Deb paketine dönüştürmek istediğimiz scriptleri ve dosyaları hazırlıyoruz. Benim örnek olarak kullandığım script github üzerinde de paylaştığım mac-changer isimli çalışmam olacak. Buradan projeye ulaşabilirsiniz.

2-Scriptimize Çalıştırma Yetkisi Verme

chmod +x mac-changer.sh
Enter fullscreen mode Exit fullscreen mode

3- Debian Paket Dosyalarının Oluşturulması

Deb paketlerinin derlenebilmesi için DEBIAN klasörü ve altında bulunacak olan control dosyası gerekmektedir.

3.1 Paketimiz için dosya oluşturalım

mkdir mac-changer
mkdir mac-changer/DEBIAN
touch mac-changer/DEBIAN/control
Enter fullscreen mode Exit fullscreen mode

3.2 Scriptimiz için dosyaları oluşturalım

mkdir -p mac-changer/usr/bin
mv mac-changer.sh mac-mhanger/usr/bin/mac-changer
Enter fullscreen mode Exit fullscreen mode

Not: Burada sh uzantısını kaldırmazsanız komutunuz sh'lı şekilde oluşacaktır

4 Debian Paketiniz için Control Dosyasının Oluşturulması

nano mac-changer/DEBIAN/control
Enter fullscreen mode Exit fullscreen mode
Package: mac-changer
Version: 1.0
Architecture: all
Maintainer: Your Name <your-mail>
Description: A tool to change MAC addresses on Linux
Depends: iproute2
Enter fullscreen mode Exit fullscreen mode

Depends alanına bağımlı olduğunuz paketleri yazabilirsiniz.

5 Paketi Oluşturma

dpkg-debpaketini kullanarak deb paketinizi oluşturabilirsiniz.

mac-changer dosyasının bulunduğu dizinde aşağıdaki komutu çalıştırdığınızda deb paketiniz oluşmuş olacaktır.

dpkg-deb --build mac-changer
Enter fullscreen mode Exit fullscreen mode

Paketi kurmak için

dpkg -i mac-changer.deb
Enter fullscreen mode Exit fullscreen mode

Çalıştırmak için

mac-changer -i virbr0
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay