1
# ##############################################
2
# Do NOT Edit the Auto-generated Part!
3
# Generated by: spectacle version ${metadata.MyVersion}
4
# ##############################################
5
#set $str_newline = '\n'
7
#if $extra.content.has_key("macros") and $extra.content.macros.has_key("main")
8
$str_newline.join($extra.content.macros.main)
15
#set $cfgstatic = "--disable-static"
17
#if $metadata.has_key('Builder')
18
#set $Builder = $metadata.Builder
21
#set $Builder = 'make'
24
#if $Builder == 'python'
25
#if $metadata.has_key("BuildArch") and $metadata.BuildArch == 'noarch'
26
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
28
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
31
Name: ${metadata.Name}
32
Summary: ${metadata.Summary}
33
Version: ${metadata.Version}
34
Release: ${metadata.Release}
35
#if $metadata.has_key("Epoch")
36
Epoch: ${metadata.Epoch}
37
#set $auto_depend = "%{epoch}:%{version}-%{release}"
39
#set $auto_depend = "%{version}-%{release}"
41
Group: ${metadata.Group}
42
License: ${metadata.License}
43
#if $metadata.has_key("ExclusiveArch")
44
ExclusiveArch: ${metadata.ExclusiveArch}
46
#if $metadata.has_key("BuildArch")
47
BuildArch: ${metadata.BuildArch}
49
#if $metadata.has_key("Prefix")
50
Prefix: ${metadata.Prefix}
52
#if $metadata.has_key("URL")
56
#if $metadata.has_key("Sources")
58
#for $source in $metadata.Sources
63
Source100: ${metadata.Name}.yaml
64
#if $metadata.has_key("RpmLintIgnore")
65
Source101: ${metadata.Name}-rpmlintrc
68
#if $metadata.has_key("Patches")
70
#for $patch in $metadata.Patches
71
## checking arch namespace prefix
72
#if $patch.startswith('arm:')
74
#set $patch = $patch[4:]
75
#else if $patch.startswith('ix86:')
76
#set $arch = '%{ix86}'
77
#set $patch = $patch[5:]
90
#end for ## each patch
92
#if 'NoAutoReq' in $metadata
96
#if $Builder == 'perl'
97
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo \$version))
99
#if $metadata.has_key("Requires")
100
#for $req in $metadata.Requires
101
## checking arch namespace prefix
102
#if $req.startswith('arm:')
103
#set $arch = '%{arm}'
105
#else if $req.startswith('ix86:')
106
#set $arch = '%{ix86}'
121
#if $metadata.has_key("RequiresPre")
122
#for $req in $metadata.RequiresPre
126
#if $metadata.has_key("RequiresPreUn")
127
#for $req in $metadata.RequiresPreUn
128
Requires(preun): $req
131
#if $metadata.has_key("RequiresPost")
132
#for $req in $metadata.RequiresPost
136
#if $metadata.has_key("RequiresPostUn")
137
#for $req in $metadata.RequiresPostUn
138
Requires(postun): $req
142
#if $metadata.has_key("PkgConfigBR")
143
#for $br in $metadata.PkgConfigBR
144
## checking arch namespace prefix
145
#if $br.startswith('arm:')
146
#set $arch = '%{arm}'
148
#else if $br.startswith('ix86:')
149
#set $arch = '%{ix86}'
158
#set $br_comps = $br.split()
159
#if $len($br_comps) > 1
160
BuildRequires: pkgconfig($br_comps[0])$br[$len($br_comps[0]):]
162
BuildRequires: pkgconfig($br_comps[0])
170
#if $metadata.has_key("PkgBR")
171
#for $br in $metadata.PkgBR
172
## checking arch namespace prefix
173
#if $br.startswith('arm:')
174
#set $arch = '%{arm}'
176
#else if $br.startswith('ix86:')
177
#set $arch = '%{ix86}'
183
#if $br == 'intltool' and not $metadata.has_key("LocaleName") and not $metadata.has_key("NoAutoLocale")
184
#set $br_locale = $metadata.Name
196
#if $metadata.has_key("BuildConflicts")
197
#for $bcfl in $metadata.BuildConflicts
198
BuildConflicts: $bcfl
201
#if $metadata.has_key("RunFdupes")
202
BuildRequires: fdupes
204
#if 'NoAutoProv' in $metadata
208
#if $metadata.has_key("Provides")
209
#for $prd in $metadata.Provides
214
#if $metadata.has_key("Conflicts")
215
#for $cfl in $metadata.Conflicts
220
#if $metadata.has_key("Obsoletes")
221
#for $obs in $metadata.Obsoletes
225
#if 'SupportOtherDistros' in $metadata
226
BuildRoot: %{_tmppath}/%{name}-%{version}-build
231
#if $metadata.has_key("Description")
232
${metadata.Description}
234
Description: %{summary}
237
#if $metadata.has_key("AutoSubPackages")
238
#for $sp in $metadata.AutoSubPackages
240
Summary: Development files for %{name}
241
Group: Development/Libraries
242
Requires: %{name} = $auto_depend
244
Development files for %{name}
249
#if $metadata.has_key("SubPackages")
250
#for $sp in $metadata.SubPackages
251
#set $sub_extra = $extra.subpkgs[$sp.Name]
252
#if $sp.has_key("AsWholeName")
258
#if $sp.has_key("License")
261
#if $sp.has_key("Group")
264
Group: ${metadata.Group}
266
#if $sp.has_key("Version")
269
#if $sp.has_key("Release")
272
#if $sp.has_key("Epoch")
275
#if $sp.has_key("URL")
278
#if $sp.has_key("BuildArch")
279
BuildArch: $sp.BuildArch
281
#if $sp.has_key("Prefix")
284
#if 'NoAutoReq' in $sp
287
#if 'NoAutoProv' in $sp
290
#if $sp.has_key("AutoDepend") and not $metadata.has_key("NoFiles")
291
Requires: %{name} = $auto_depend
293
#if $sp.has_key("Requires")
294
#for $req in $sp.Requires
295
## checking arch namespace prefix
296
#if $req.startswith('arm:')
297
#set $arch = '%{arm}'
299
#else if $req.startswith('ix86:')
300
#set $arch = '%{ix86}'
315
#if $sp.has_key("RequiresPre")
316
#for $req in $sp.RequiresPre
320
#if $sp.has_key("RequiresPreUn")
321
#for $req in $sp.RequiresPreUn
322
Requires(preun): $req
325
#if $sp.has_key("RequiresPost")
326
#for $req in $sp.RequiresPost
330
#if $sp.has_key("RequiresPostUn")
331
#for $req in $sp.RequiresPostUn
332
Requires(postun): $req
336
#if $sp.has_key("Provides")
337
#for $prd in $sp.Provides
342
#if $sp.has_key("Conflicts")
343
#for $cfl in $sp.Conflicts
348
#if $sp.has_key("Obsoletes")
349
#for $obs in $sp.Obsoletes
354
#if $sp.has_key("PkgBR")
355
#for $br in $sp.PkgBR
356
## checking arch namespace prefix
357
#if $br.startswith('arm:')
358
#set $arch = '%{arm}'
360
#else if $br.startswith('ix86:')
361
#set $arch = '%{ix86}'
377
#if $sp.has_key("PkgConfigBR")
378
#for $br in $sp.PkgConfigBR
379
## checking arch namespace prefix
380
#if $br.startswith('arm:')
381
#set $arch = '%{arm}'
383
#else if $br.startswith('ix86:')
384
#set $arch = '%{ix86}'
393
#set $br_comps = $br.split()
394
#if $len($br_comps) > 1
395
BuildRequires: pkgconfig($br_comps[0])$br[$len($br_comps[0]):]
397
BuildRequires: pkgconfig($br_comps[0])
405
#if $sp.has_key("BuildConflicts")
406
#for $bcfl in $sp.BuildConflicts
407
BuildConflicts: $bcfl
411
#if $sp.has_key("AsWholeName")
412
%description -n $sp.Name
414
%description $sp.Name
416
#if $sp.has_key('Description')
419
Description: %{summary}
425
############################ prep scripts
427
#if $metadata.has_key("Sources")
428
#if $metadata.has_key("NoSetup")
430
#else if $metadata.has_key("SetupOptions")
431
%setup $metadata.SetupOptions
433
%setup -q -n $metadata.SourcePrefix
436
#end if ## has Sources
438
#if $metadata.has_key("Patches")
440
#for $patch in $metadata.Patches
441
## checking arch namespace prefix
442
#if $patch.startswith('arm:')
443
#set $arch = '%{arm}'
444
#set $patch = $patch[4:]
445
#else if $patch.startswith('ix86:')
446
#set $arch = '%{ix86}'
447
#set $patch = $patch[5:]
455
$metadata.PatchCmts[$idx]
456
#if 'PatchOpts' in $metadata
457
%patch${idx} $metadata.PatchOpts[$idx]
468
#if $extra.content.has_key("setup") and $extra.content.setup.has_key("main")
469
$str_newline.join($extra.content.setup.main)
473
############################ build scripts
475
#if not $metadata.has_key('UseAsNeeded')
479
#if $extra.content.has_key("build") and $extra.content.build.has_key("pre")
480
$str_newline.join($extra.content.build.pre)
484
############################
485
#if $Builder == 'python'
486
CFLAGS="\$RPM_OPT_FLAGS" %{__python} setup.py build
487
#else if $Builder == 'qmake'
488
#set $Configure = 'none'
489
qmake-qt4 install_prefix=/usr
490
make %{?jobs:-j%jobs}
491
#else if $Builder == 'perl'
492
if test -f Makefile.PL; then
493
%{__perl} Makefile.PL INSTALLDIRS=vendor
494
make %{?jobs:-j%jobs}
496
%{__perl} Build.PL --installdirs vendor
501
#if $metadata.has_key('Configure')
502
#set $Configure = $metadata.Configure
506
#if $Builder == 'cmake'
507
#set $Configure = 'cmake'
509
#set $Configure = 'configure'
513
#if $Configure == 'autogen'
514
%autogen $cfgstatic#slurp
515
#else if $Configure == 'cmake'
519
#else if $Configure == 'configure'
520
%configure $cfgstatic#slurp
521
#else if $Configure == 'reconfigure'
522
%reconfigure $cfgstatic#slurp
523
#else if $Configure == 'cmake'
524
%reconfigure $cfgstatic#slurp
526
## any other values fall thru to 'noconfigure'
527
#if ( $Configure != 'noconfigure' or $Configure != 'none' ) and $metadata.has_key("ConfigOptions")
529
#set $length = len($metadata.ConfigOptions)
531
#for $opt in $metadata.ConfigOptions
532
## checking arch namespace prefix
533
#if $opt.startswith('arm:')
534
#set $arch = '%{arm}'
536
#else if $opt.startswith('ix86:')
537
#set $arch = '%{ix86}'
557
#end if ## ConfigOptions
559
#if $Builder == 'make' or $Builder == 'cmake'
560
make %{?jobs:-j%jobs}
561
#else if $Builder == 'single-make'
563
#else if $Builder != 'no-make' and $Builder != 'none' and $Builder != 'no-builder'
566
#end if ## Builder == python
567
############################
570
#if $extra.content.has_key("build") and $extra.content.build.has_key("post")
571
$str_newline.join($extra.content.build.post)
574
############################ installation scripts
576
#if 'SupportOtherDistros' in $metadata
577
rm -rf \$RPM_BUILD_ROOT
582
#if $extra.content.has_key("install") and $extra.content.install.has_key("pre")
583
$str_newline.join($extra.content.install.pre)
586
#if $Builder == 'python'
587
#if 'SupportOtherDistros' in $metadata
588
%if 0%{?suse_version}
589
%{__python} setup.py install --root=\$RPM_BUILD_ROOT --prefix=%{_prefix}
591
%{__python} setup.py install --root=\$RPM_BUILD_ROOT -O1
594
%{__python} setup.py install --root=%{buildroot} -O1
596
#else if $Builder == 'perl'
597
if test -f Makefile.PL; then
598
make pure_install PERL_INSTALL_ROOT=%{buildroot}
600
./Build install --installdirs vendor
602
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
603
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
604
find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
605
%{_fixperms} %{buildroot}/*
606
#else if $Builder == 'make' or $Builder == 'single-make' or $Builder == 'qmake' or $Builder == 'cmake'
607
#if $Builder == 'qmake'
608
#set $extra_install_param="INSTALL_ROOT=%{buildroot}"
610
#set $extra_install_param=""
612
#if 'SupportOtherDistros' in $metadata
613
%if 0%{?moblin_version}
614
%make_install $extra_install_param
619
#if $Builder == 'cmake'
622
%make_install $extra_install_param
624
#end if ## of Builder==???
625
#if $metadata.has_key("ExtraInstall")
626
$metadata.ExtraInstall
630
#if $extra.content.has_key("install") and $extra.content.install.has_key("post")
631
$str_newline.join($extra.content.install.post)
635
desktop-file-install --delete-original \
636
--dir %{buildroot}%{_datadir}/applications \
637
%{buildroot}%{_datadir}/applications/*.desktop
639
#if $metadata.has_key("LocaleName")
640
#if $metadata.has_key("LocaleOptions")
641
#set $localeopt_str = $metadata["LocaleOptions"]
642
%find_lang ${metadata.LocaleName} $localeopt_str
644
%find_lang ${metadata.LocaleName}
646
#else if $br_locale != ""
647
%find_lang $br_locale
649
############################ run fdupes
650
#if $metadata.has_key("RunFdupes")
651
%fdupes %{buildroot}/${metadata.RunFdupes}
653
############################ optional check scripts
654
#if $metadata.has_key("Check")
657
#if $extra.content.has_key("check")
658
$str_newline.join($extra.content.check.main)
660
#if $Builder == 'perl'
661
if test -f Makefile.PL; then
673
############################ Pre
674
#set $has_extra_pre = $extra.content.has_key("pre") and $extra.content.pre.has_key("main")
675
#if $extra.Schema or $has_extra_pre
679
if [ "$1" -gt 1 ]; then
680
#for $schema in $extra.Schemas
681
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
682
gconftool-2 --makefile-uninstall-rule \
691
$str_newline.join($extra.content.pre.main)
696
############################ PreUn
697
#set $has_extra_preun = $extra.content.has_key("preun") and $extra.content.preun.has_key("main")
698
#if $extra.Schema or $has_extra_preun
702
if [ "$1" -eq 0 ]; then
703
#for $schema in $extra.Schemas
704
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
705
gconftool-2 --makefile-uninstall-rule \
714
$str_newline.join($extra.content.preun.main)
719
############################ Post
720
#set $has_extra_post = $extra.content.has_key("post") and $extra.content.post.has_key("main") and $extra.content.post.main
721
#if $extra.Lib or $extra.Info or $extra.Schema or $extra.Icon or $extra.DesktopDB or $has_extra_post
722
#set $only_Lib = not ($extra.Info or $extra.Schema or $extra.Icon or $extra.DesktopDB or $has_extra_post)
724
%post -p /sbin/ldconfig
729
#if $extra.Lib and not $only_Lib
734
#for $schema in $extra.Schemas
735
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
736
gconftool-2 --makefile-install-rule \
737
$schema > /dev/null || :
742
#for $inf in $extra.Infos
743
%install_info --info-dir=%_infodir $inf
748
/bin/touch --no-create %{_datadir}/icons/hicolor || :
749
%{_bindir}/gtk-update-icon-cache \
750
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
754
update-desktop-database %{_datadir}/applications &> /dev/null || :
756
## -Extra Post Script
759
$str_newline.join($extra.content.post.main)
764
############################ PostUn
765
#set $has_extra_postun = $extra.content.has_key("postun") and $extra.content.postun.has_key("main") and $extra.content.postun.main
766
#if $extra.Lib or $extra.Info or $extra.Icon or $extra.DesktopDB or $has_extra_postun
767
#set $only_Lib = not ($extra.Info or $extra.Icon or $extra.DesktopDB or $has_extra_postun)
769
%postun -p /sbin/ldconfig
773
#if $extra.Lib and not $only_Lib
779
#for $inf in $extra.Infos
780
%install_info_delete --info-dir=%{_infodir} $inf
786
/bin/touch --no-create %{_datadir}/icons/hicolor || :
787
%{_bindir}/gtk-update-icon-cache \
788
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
792
update-desktop-database %{_datadir}/applications &> /dev/null || :
794
## -Extra Postun Script
795
#if $has_extra_postun
797
$str_newline.join($extra.content.postun.main)
800
#end if ## need postun
802
########################################
803
## Pre/Preun/Post/Postun for SubPackages
804
#if $metadata.has_key("SubPackages")
805
#for $sp in $metadata.SubPackages
806
#if $sp.has_key("AsWholeName")
807
#set $pkg_name = "-n " + $sp.Name
809
#set $pkg_name = $sp.Name
811
#set $sub_extra = $extra.subpkgs[$sp.Name]
812
#######################
813
## Pre for SubPackages
814
#set $has_extra_pre = $extra.content.has_key("pre") and $extra.content.pre.has_key($sp.Name)
815
#if $sub_extra.Schema or $has_extra_pre
818
#if $sub_extra.Schema
819
if [ "$1" -gt 1 ]; then
820
#for $schema in $sub_extra.Schemas
821
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
822
gconftool-2 --makefile-uninstall-rule \
831
$str_newline.join($extra.content.pre[$sp.Name])
836
#######################
837
## Preun for SubPackages
838
#set $has_extra_preun = $extra.content.has_key("preun") and $extra.content.preun.has_key($sp.Name)
839
#if $sub_extra.Schema or $has_extra_preun
842
#if $sub_extra.Schema
843
if [ "$1" -eq 0 ]; then
844
#for $schema in $sub_extra.Schemas
845
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
846
gconftool-2 --makefile-uninstall-rule \
855
$str_newline.join($extra.content.preun[$sp.Name])
860
#######################
861
## Post for SubPackages
862
#set $has_extra_post = $extra.content.has_key("post") and $extra.content.post.has_key($sp.Name) and $extra.content.post[$sp.Name]
863
#if $sub_extra.Lib or $sub_extra.Info or $sub_extra.Icon or $sub_extra.Schema or $sub_extra.DesktopDB or $has_extra_post
864
#set $only_Lib = not ($sub_extra.Info or $sub_extra.Icon or $sub_extra.Schema or $sub_extra.DesktopDB or $has_extra_post)
866
%post $pkg_name -p /sbin/ldconfig
871
#if $sub_extra.Lib and not $only_Lib
875
#if $sub_extra.Schema
876
#for $schema in $sub_extra.Schemas
877
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
878
gconftool-2 --makefile-install-rule \
879
$schema > /dev/null || :
884
#for $inf in $sub_extra.Infos
885
%install_info --info-dir=%_infodir $inf
890
/bin/touch --no-create %{_datadir}/icons/hicolor || :
891
%{_bindir}/gtk-update-icon-cache \
892
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
895
#if $sub_extra.DesktopDB
896
update-desktop-database %{_datadir}/applications &> /dev/null || :
898
## -Extra Post Script
901
$str_newline.join($extra.content.post[$sp.Name])
906
#######################
907
## PostUn for SubPackages
908
#set $has_extra_postun = $extra.content.has_key("postun") and $extra.content.postun.has_key($sp.Name) and $extra.content.postun[$sp.Name]
909
#if $sub_extra.Lib or $sub_extra.Info or $sub_extra.Icon or $sub_extra.DesktopDB or $has_extra_postun
910
#set $only_Lib = not ($sub_extra.Info or $sub_extra.Icon or $sub_extra.DesktopDB or $has_extra_postun)
912
%postun $pkg_name -p /sbin/ldconfig
916
#if $sub_extra.Lib and not $only_Lib
921
#for $inf in $sub_extra.Infos
922
%install_info_delete --info-dir=%{_infodir} $inf
928
/bin/touch --no-create %{_datadir}/icons/hicolor || :
929
%{_bindir}/gtk-update-icon-cache \
930
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
933
#if $sub_extra.DesktopDB
934
update-desktop-database %{_datadir}/applications &> /dev/null || :
936
## -Extra Postun Script
937
#if $has_extra_postun
939
$str_newline.join($extra.content.postun[$sp.Name])
942
#end if ## need postun
943
#end for ## per subpackage
944
#end if ## has subpackages
946
#if not $metadata.has_key("NoFiles")
947
#if $metadata.has_key("LocaleName")
948
%files -f ${metadata.LocaleName}.lang
949
#else if $br_locale != ""
950
%files -f ${br_locale}.lang
951
#else if $metadata.has_key('FilesInput')
952
%files -f $metadata.FilesInput
956
%defattr(-,root,root,-)
957
## TODO to be cleanup
958
#if $metadata.has_key("Documents")
959
#for $doc in $metadata.Documents
963
#if "Files" in $metadata:
964
#for $f in $metadata.Files
969
#if $extra.content.has_key("files") and $extra.content.files.has_key("main")
970
$str_newline.join($extra.content.files.main)
973
#end if ## not NoFiles
975
#if $metadata.has_key("AutoSubPackages")
976
#for $sp in $metadata.AutoSubPackages
978
%defattr(-,root,root,-)
980
#if $extra.content.has_key("files") and $extra.content.files.has_key($sp)
981
$str_newline.join($extra.content.files[$sp])
989
#if $metadata.has_key("SubPackages")
990
#for $sp in $metadata.SubPackages
991
#if $sp.has_key("AsWholeName")
992
#set $pkg_name = "-n " + $sp.Name
994
#set $pkg_name = $sp.Name
996
#if $sp.has_key('FilesInput')
997
%files $pkg_name -f $sp.FilesInput
1001
%defattr(-,root,root,-)
1002
## TODO to be cleanup
1003
#if $sp.has_key("Documents")
1004
#for $doc in $sp.Documents
1009
#for $f in $sp.Files
1014
#if $extra.content.has_key("files") and $extra.content.files.has_key($sp.Name)
1015
$str_newline.join($extra.content.files[$sp.Name])