ymp Özellik(uses) ve Ek Özellikler(uses_extra) Ekleme

 Örneğimizde rsync paketi olsun..

1- Şablon Oluşturalım

ymp template --name=rsync  --version=3.2.7 --email=bk@gmail.com --maintainer=bk --source=https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz --output=rs

Creating template: rs

2- Paket Yapalım

ymp build rs

USE flag: all
%100  rsync-3.2.7.tar.gz  1.1 MB  1.1 MB
 
ERROR: md5sum check failed. Excepted: FIXME <> Reveiced: f216f350ef56b9ba61bc313cb6ec2ed6
ERROR: Process: build failed. Exited with 2.
/ #

3- md5sums Değerini Düzenleyelim

nano rs/ympbuild

Düzenleyelim kaydedip çıkalım.. 

4- Tekrar Paket oluşturma komutunu verelim

/ # ymp build rs
Aşağıdaki gibi bir çıktı oluşuyor. 

Configure found the following issues:
- Failed to find xxhash.h for xxhash checksum support.
- Failed to find zstd.h for zstd compression support.
See the INSTALL file for hints on how to install the missing libraries and/or
how to generate (or fetch) manpages:
   https://github.com/WayneD/rsync/blob/master/INSTALL.md
To disable one or more features, the relevant configure options are:
   --disable-xxhash
   --disable-zstd
configure.sh: error: Aborting configure run
ERROR: Failed to build package. Action: setup
ERROR: Process: build failed. Exited with 1.


5-Ek Özellikler(more features) Düzenleniyor

4. adımdaki çıktıda xxhash ve zstd ek özellikler düzenlememiz gerekiyor. Bunun için;
Tekrar nano /rs/ympbuild komutuyla dosyada düzenleme yapmamız gerekiyor.
uses özellik listesi. Oraya paket adı değil özellik adı yazılıyor. uses ile belirtilen özelliği if use veya use_opt ile kullanıyoruz..
Aşağıda kullanımı gösterilmiştir.

uses_extra=(zstd xxhash)
arch=('x86_64')
cd $name-$version
setup(){
   ./configure --prefix=/usr \
       --libdir=/usr/lib64/ \
       $(use_opt zstd --enable-zstd --disable-zstd) \
       $(use_opt xxhash --enable-xxhash --disable-xxhash)
}

Kısacası;
uses                : temel özellikler 
uses_extra      : ek özellikler
Aşağıda öe-rnek bir ympbuild dosyasında ayarlanması şu şekildedir;

#!/usr/bin/env bash
name='rsync'
release='1'
version='3.2.7'
url='https://example.org'
description='Rsync is a tool for syncing files.'
email='bk@gmail.com'
maintainer='bk'
license=('GPLv3')
source=("https://download.samba.org/pub/rsync/src/rsync-$version.tar.gz")
depends=()
makedepends=()
md5sums=('f216f350ef56b9ba61bc313cb6ec2ed6')
group=(net.misc)
uses=()
uses_extra=(zstd xxhash)
arch=('x86_64')
cd $name-$version
setup(){
   ./configure --prefix=/usr \
       --libdir=/usr/lib64/ \
       $(use_opt zstd --enable-zstd --disable-zstd) \
       $(use_opt xxhash --enable-xxhash --disable-xxhash)
}
build(){
   make -j`nproc`
}
package(){
   make install -j`nproc`
}


setup bölümündeki satırlar aslında tek satır Bu sebepten satır devam ettiğini ifade eden \ 
işareti konulduğuna dikkat ediniz..
Yukarıda kırmızı ve mavi renkteki ifadeleri dosyaya ekleyip kaydedip çıkıyoruz..

Tekrardan ymp build rs komutunu veriyoruz. Aşağıdaki gibi paket oluşuyor.

6-Paket Kurulumu

/ # ymp it rs/rsync_3.2.7_1_x86_64.ymp  
Installing: rsync
Calculating leftovers
Validating: rsync (files)
Validating: rsync (links)
Quarantine installation
Clear leftovers
Generating locales...
Generation complete.
/ # rsync
rsync      rsync-ssl

Paket başarılı bir şekilde kuruldu

Yorum Gönder

Daha yeni Daha eski