
    )iP                     J    S SK r S SKrS SKrS SKrS SKrS rS rS rS rS r	g)    Nc                 n    / n[         R                  R                   H  nSU :X  a  M  USU 3/-  nM     U$ )Nzosmocom-{f}osmocom-)libconfigfeeds)pkgnameretfs      /obs/lib/metapkg.pyget_conflictsr   
   s@    
CZZG#(1#  J    c                     [         R                  R                   SU  3n[        R                  R                  U5      (       a  [         R                  " SSU/5        [        R                  " U S35        [        R                  " U S35        g )N/rmz-rfz/debianz/contrib)r   r   
path_cacheospathexistsrun_cmdmakedirs)r   r   s     r   prepare_source_dirr      si    jj##$AgY/D	ww~~dT5$'(KK4& !KK4&!"r   c                    [         R                  R                   SU  3n[        U 5      n[	        U S3S5       nUR                  SU  S35        UR                  S5        UR                  S5        UR                  S5        UR                  S	5        UR                  S
5        UR                  S5        UR                  SU  S35        UR                  S5        UR                  S5        UR                  SSR                  U5       S35        UR                  SU S35        S S S 5        [	        U S3S5       nUR                  U  SU S35        UR                  S5        UR                  SU S35        UR                  S5        UR                  S5        S S S 5        [	        U S3S5       nUR                  S5        UR                  S5        UR                  S5        S S S 5        [         R                  " SSU S3/5        [	        U S3S5       nUR                  S5        S S S 5        g ! , (       d  f       GN= f! , (       d  f       N= f! , (       d  f       Nw= f! , (       d  f       g = f)Nr   z/debian/controlwzSource: 
zSection: unknown
zPriority: optional
z3Maintainer: Osmocom OBS scripts <info@osmocom.org>
z!Build-Depends: debhelper (>= 10)
zStandards-Version: 3.9.8
z	Package: z)Depends: osmocom-keyring ${misc:Depends}
zArchitecture: any
Conflicts: z, z+Description: Dummy package, conflicts with z/debian/changelogz (z) unstable; urgency=medium
z)  * Dummy package, which conflicts with: zL -- Osmocom OBS scripts <info@osmocom.org>  Tue, 25 Jul 2022 15:48:00 +0200
z/debian/rulesz#!/usr/bin/make -f
z%:
z	dh $@
chmodz+xz/debian/compatz10
)r   r   r   r   openwritejoinr   )r   versionr   	conflictsr
   s        r   generate_debian_pkgr"      s   jj##$AgY/Dg&I	o&	,	(7)2&'	$%	&'	FG	45	,-		)G9B'(	<=	%&	+dii	23267	=i[KL 
- 
'(#	.!	7)2gY&BCD		;I;bIJ		 $ 	% 
/ 
m$c	*a	&'		 
+
 KK$4& 678	n%s	+q	 
,	+; 
-	, 
/	. 
+	* 
,	+s1   C,H6=A I44II*6
I
I
I'*
I8c                 V   [        U  S35        [        R                  R                   SU  SU  S3n[	        U 5      n[        US5       nUR                  SU  S35        UR                  SU S35        UR                  S	U S35        UR                  S
5        UR                  S5        UR                  S5        U H  nUR                  SU S35        M     UR                  S5        UR                  SU S35        UR                  S5        S S S 5        g ! , (       d  f       g = f)Nz: generating rpm spec filer   z	/contrib/z.spec.inr   z	Name:    r   z	Version: z(Summary: Dummy package, conflicts with: zRelease: 0
zLicense: AGPL-3.0-or-later
zGroup:   Hardware/Mobile
r   z%description
z%Dummy package, which conflicts with: z%files
)printr   r   r   r   r   r   )r   r    r   r!   r
   conflicts         r   generate_rpm_specr&   B   s   	WI/
01jj##$AgYiyIDg&I	dCA	)G9B'(	)G9B'(	:9+RHI		./	,-!HGGk(2./ "	 !	7	{"EF	
 
s   	CD
D(c                     [         R                  R                  n [         R                  R                  =(       d    SU  3n[         R                  R                  nU(       a  UO[         R
                  R                  n[        U SU 35        [        U5        [        X5        [        R                  " [         R                  " U5      5        [         R                  " 5         [         R                  R                  U5        [         R                  R!                  U5        [#        X5        [         R$                  R'                  U5        [         R                  " 5         U$ )Nr   z: generating meta package )r   argsfeedconflict_pkgnameconflict_versionr   meta_package_versionr$   r   r"   r   r   get_output_pathremove_cache_extra_filesdebianbuild_source_packagemove_files_to_outputr&   rpm_speccopy_to_output)r)   r   r+   r    s       r   buildr4   U   s    88==Dhh''<XdV+<Gxx00"2

8W8WG	WI/y
9:w)KK##G,-  "JJ##G,JJ##G,g'LL(  "Nr   )
r   r   
lib.config
lib.debianlib.rpm_specr   r   r"   r&   r4    r   r   <module>r9      s0    
 
   #"J&r   