z/i JSSKrSSKrSSKrSSKrSSKrSrSrSrSrSr g)Nc[RRU5n[R"US3SS9n[ U5S:deU(aUS$S$)Nz/**/contrib/*.spec.inT) recursiver)libgit get_repo_pathgloblen)project repo_pathrets /obs/lib/rpm_spec.pyget_spec_in_pathr sO%%g.I ))yk!674 HC s8a<<3q6"d"c[R"U5n[R"US35n[U5S:Xde[R R US5$)zGet the name to the .tar.xz file generated by dpkg-buildpackage, that we also use in the rpm spec file. This requires lib.debian.move_files_to_output() to run first.z/*.tar.*r)rget_output_pathr r ospathbasename)r path_outputr s rget_source_namersR%%g.K )){m8, -C s8q== 77  CF ##rc [U5nSU3nU(aUSU3- n[R"SSSSUSU/5 [R"SSSSUSU/5 g) zAdd a 'Requires: ...' line below the 'Name:' and '%package' lines of the .spec.in file. :param pkgname: of the meta-package to depend on (e.g. osmocom-nightly) :param version: of the meta-pkgname to depend on or None z Requires: z = sed-ez /^Name:/a\-iz /^%package/a\N)rrrun_cmd)r pkgnameversionrreq_lines r add_dependr!sh G $DG9%Hc'O#KKmT8T4HIKK.hdKLrc [US35 [U5n[U5nURSS5n[R "SSUS3SU/5 U(a"SU3n[R "SS S S USU/5 [R "SS US3SU/5 S n[R "SS S S USU/5 [R "SS[ RRU5S3SU/5 g)z`Update the version and source in the .spec.in file. :param version: from get-version-gen script z: generating rpm spec file-.rzs/^Version:.*/Version: /rzEpoch: rz /^Version:/a\zs/^Source:.*/Source: zSource1: rpmlintrcz /^Source:/a\zs/^%setup/%setup -n N) printrrreplacerrrrr)r repochrsource epoch_line rpmlint_lines rgenerater,.s WI/ 01 G $D W %Fooc3'GKK1'!r8s1 #$M$<Fr