]> git.pld-linux.org Git - packages/yq.git/blob - yq.spec
disable debugsource packages
[packages/yq.git] / yq.spec
1 %define         vendor_ver      4.30.8
2
3 Summary:        Command-line YAML, JSON, XML, CSV and properties processor
4 Name:           yq
5 Version:        4.30.8
6 Release:        1
7 License:        MIT
8 Group:          Applications/Text
9 Source0:        https://github.com/mikefarah/yq/archive/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5:  78ccc739a27454c9564019a3a0515906
11 Source1:        %{name}-vendor-%{vendor_ver}.tar.xz
12 # Source1-md5:  00401f6d57414f386cea4893efabdfa9
13 URL:            https://mikefarah.gitbook.io/yq/
14 BuildRequires:  golang >= 1.19
15 BuildRequires:  rpm-build >= 4.6
16 BuildRequires:  rpmbuild(macros) >= 2.009
17 BuildRequires:  tar >= 1:1.22
18 BuildRequires:  xz
19 ExclusiveArch:  %go_arches
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _debugsource_packages   0
23
24 %description
25 A lightweight and portable command-line YAML, JSON and XML processor.
26 yq uses jq like syntax but works with yaml files as well as json, xml,
27 properties, csv and tsv. It doesn't yet support everything jq does -
28 but it does support the most common operations and functions, and more
29 is being added continuously.
30
31 %package -n bash-completion-yq
32 Summary:        Bash completion for yq command line
33 Group:          Applications/Shells
34 Requires:       %{name} = %{version}-%{release}
35 Requires:       bash-completion >= 1:2.0
36 BuildArch:      noarch
37
38 %description -n bash-completion-yq
39 Bash completion for yq command line.
40
41 %package -n fish-completion-yq
42 Summary:        fish-completion for yq
43 Group:          Applications/Shells
44 Requires:       %{name} = %{version}-%{release}
45 Requires:       fish
46 BuildArch:      noarch
47
48 %description -n fish-completion-yq
49 fish-completion for yq.
50
51 %package -n zsh-completion-yq
52 Summary:        ZSH completion for yq command line
53 Group:          Applications/Shells
54 Requires:       %{name} = %{version}-%{release}
55 Requires:       zsh
56 BuildArch:      noarch
57
58 %description -n zsh-completion-yq
59 ZSH completion for yq command line.
60
61 %prep
62 %setup -q -a1
63 %{__mv} %{name}-%{vendor_ver}/vendor .
64
65 %build
66 %__go build -v -mod=vendor -o target/yq
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 install -d $RPM_BUILD_ROOT{%{_bindir},%{bash_compdir},%{fish_compdir},%{zsh_compdir}}
72
73 cp -p target/yq $RPM_BUILD_ROOT%{_bindir}/yq
74
75 ./target/yq shell-completion bash > $RPM_BUILD_ROOT%{bash_compdir}/yq
76 ./target/yq shell-completion fish > $RPM_BUILD_ROOT%{fish_compdir}/yq.fish
77 ./target/yq shell-completion zsh > $RPM_BUILD_ROOT%{zsh_compdir}/_yq
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc CONTRIBUTING.md README.md
85 %attr(755,root,root) %{_bindir}/yq
86
87 %files -n bash-completion-yq
88 %defattr(644,root,root,755)
89 %{bash_compdir}/yq
90
91 %files -n fish-completion-yq
92 %defattr(644,root,root,755)
93 %{fish_compdir}/yq.fish
94
95 %files -n zsh-completion-yq
96 %defattr(644,root,root,755)
97 %{zsh_compdir}/_yq
This page took 0.051651 seconds and 3 git commands to generate.