1
1
%global srcname keycloak-httpd-client-install
2
2
%global summary Tools to configure Apache HTTPD as Keycloak client
3
3
4
- %if 0%{?fedora }
5
- %global with_python3 1
4
+ %if (0%{?fedora } > 0 && 0%{?fedora } < 30) || (0%{?rhel } > 0 && 0%{?rhel } <= 7)
5
+ %bcond_without python2
6
+ %bcond_without python3
7
+ %endif
8
+
9
+ %if 0%{?fedora } >= 30 || 0%{?rhel } >= 8
10
+ %bcond_with python2
11
+ %bcond_without python3
6
12
%endif
7
13
8
14
Name: %{srcname }
9
- Version: 0.4
10
- Release: 1 %{?dist }
15
+ Version: 1.2
16
+ Release: %{? release_string }%{ ! ?release_string: 1} %{?dist }
11
17
Summary: %{summary }
12
18
13
- %global git_tag RELEASE_%(r= %{version }; echo $r | tr '.' '_')
14
-
15
- License: GPLv3
16
- URL: https://github.com/jdennis/keycloak-httpd-client-install
17
- Source0: https://github.com/jdennis/keycloak-httpd-client-install/archive/%{git_tag }.tar.gz#/%{srcname}-%{version}.tar.gz
18
19
20
+ License: GPL-3.0 -or-later
21
+ URL: https://github.com/lachset/keycloak-httpd-client-install
22
+ Source0: https://github.com/lachset/keycloak-httpd-client-install/releases/download/%{version }/keycloak-httpd-client-install-%{version }.tar.gz
19
23
BuildArch: noarch
20
24
25
+ %if %{with python2 }
21
26
BuildRequires: python2-devel
27
+ %endif
28
+ # ^^^ with_python2
29
+
22
30
%if 0%{?with_python3 }
23
31
BuildRequires: python3-devel
32
+ BuildRequires: (python3-setuptools if python3-devel >= 3.12)
24
33
%endif
25
34
26
35
Requires: %{_bindir }/keycloak-httpd-client-install
@@ -33,21 +42,24 @@ libraries and tools which can automate and simplify configuring an
33
42
Apache HTTPD authentication module and registering as a client of a
34
43
Keycloak IdP.
35
44
45
+ %if %{with python2 }
36
46
%package -n python2-%{srcname }
37
47
Summary: %{summary }
38
48
39
49
%{?python_provide:%python_provide python2-%{srcname }}
40
50
41
51
Requires: %{name } = %{version }-%{release }
42
- Requires: python -requests
43
- Requires: python -requests-oauthlib
44
- Requires: python -jinja2
52
+ Requires: python2 -requests
53
+ Requires: python2 -requests-oauthlib
54
+ Requires: python2 -jinja2
45
55
Requires: %{_bindir }/keycloak-httpd-client-install
46
56
47
57
%description -n python2-%{srcname }
48
58
Keycloak is an authentication server. This package contains libraries and
49
59
programs which can invoke the Keycloak REST API and configure clients
50
60
of a Keycloak server.
61
+ %endif
62
+ # ^^^ with_python2
51
63
52
64
%if 0%{?with_python3 }
53
65
%package -n python3-%{srcname }
@@ -59,6 +71,7 @@ Requires: %{name} = %{version}-%{release}
59
71
Requires: python3-requests
60
72
Requires: python3-requests-oauthlib
61
73
Requires: python3-jinja2
74
+ Requires: python3-lxml
62
75
63
76
%description -n python3-%{srcname }
64
77
Keycloak is an authentication server. This package contains libraries and
@@ -68,25 +81,36 @@ of a Keycloak server.
68
81
%endif
69
82
70
83
%prep
71
- %autosetup -n %{srcname }-%{version }
84
+ %autosetup -n %{srcname }-%{version } -p1
72
85
73
86
%build
87
+ %if %{with python2 }
74
88
%py2_build
89
+ %endif
90
+ # ^^^ with_python2
91
+
75
92
%if 0%{?with_python3 }
76
93
%py3_build
77
94
%endif
78
95
79
96
%install
97
+ %if %{with python2 }
80
98
# Must do the python2 install first because the scripts in /usr/bin are
81
99
# overwritten with every setup.py install, and in general we want the
82
100
# python3 version to be the default.
83
101
%py2_install
102
+ %endif
103
+ # ^^^ with_python2
104
+
84
105
%if 0%{?with_python3 }
85
106
# py3_install won't overwrite files if they have a timestamp greater-than
86
107
# or equal to the py2 installed files. If both the py2 and py3 builds execute
87
108
# quickly the files end up with the same timestamps thus leaving the py2
88
109
# version in the py3 install. Therefore remove any files susceptible to this.
110
+ %if %{with python2 }
89
111
rm %{buildroot }%{_bindir }/keycloak-httpd-client-install
112
+ %endif
113
+ # ^^^ with_python2
90
114
%py3_install
91
115
%endif
92
116
@@ -98,37 +122,28 @@ install -c -m 644 doc/keycloak-httpd-client-install.8 %{buildroot}/%{_mandir}/ma
98
122
%doc README.md doc/ChangeLog
99
123
%{_datadir }/%{srcname }/
100
124
125
+ %if %{with python2 }
101
126
# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
102
127
%files -n python2-%{srcname }
103
128
%{python2_sitelib }/*
129
+
104
130
%if ! 0%{?with_python3 }
105
131
%{_bindir }/keycloak-httpd-client-install
106
132
%{_bindir }/keycloak-rest
107
133
%{_mandir }/man8/*
108
134
%endif
135
+ %endif
136
+ # ^^^ with_python2
109
137
110
138
%if 0%{?with_python3 }
111
139
%files -n python3-%{srcname }
112
140
%{python3_sitelib }/*
113
141
%{_bindir }/keycloak-httpd-client-install
142
+ %{_bindir }/keycloak-rest
114
143
%{_mandir }/man8/*
115
144
%endif
116
145
117
146
%changelog
118
- *
Wed Jun 8 2016 John Dennis <[email protected] > -
0.4-1
119
- - new upstream
120
- - add methods to add/remove client redirect URI
121
- - add function to parse SP metadata to extract AssertionConsumerServiceURL's
122
- - Add all AssertionConsumerServiceURL's as redirect URI's during
123
- client registration.
124
-
125
- *
Fri May 20 2016 John Dennis <[email protected] > -
0.3-1
126
- - new upstream
127
- See ChangeLog for details
128
-
129
- *
Tue May 17 2016 John Dennis <[email protected] > -
0.2-1
130
- - new upstream
131
- - Add keycloak-httpd-client-install.8 man page
132
-
133
- *
Fri May 13 2016 John Dennis <[email protected] > -
0.1-1
134
- - Initial version
147
+ *
Mon Aug 19 2024 Tomas Halman <[email protected] > -
1.2-1
148
+ Repository cleanup, preparing for new version
149
+ Spec file is adopted from Fedora.
0 commit comments