-
Notifications
You must be signed in to change notification settings - Fork 0
/
freeipa-jpegphoto.spec
134 lines (99 loc) · 4.03 KB
/
freeipa-jpegphoto.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
%global debug_package %{nil}
%global plugin_name jpegphoto
%global ipa_python3_sitelib %{python3_sitelib}
Name: freeipa-%{plugin_name}
Version: 0.1.8
Release: 1%{?dist}
Summary: user avatar integration for FreeIPA
BuildArch: noarch
License: GPLv3+
URL: https://github.com/jasperroloff/freeipa-jpegphoto
Source0: freeipa-jpegphoto-%{version}.tar.gz
BuildRequires: ipa-server-common >= 4.6.0
BuildRequires: python3-devel
BuildRequires: python3-ipaserver >= 4.6.0
Requires(post): python3-ipa-%{plugin_name}-server
Requires: python3-ipa-%{plugin_name}-server
%description
A FreeIPA extension to add avatar field to user objects.
%package -n python3-ipa-%{plugin_name}-server
Summary: Server side of user avatar with FreeIPA
License: GPLv3+
Requires: python3-ipaserver
%description -n python3-ipa-%{plugin_name}-server
A FreeIPA extension to add avatar field to user objects.
This package adds server-side support for FreeIPA.
%prep
%autosetup
%build
touch debugfiles.list
%install
rm -rf $RPM_BUILD_ROOT
%__mkdir_p %buildroot/%_datadir/ipa/schema.d
%__mkdir_p %buildroot/%_datadir/ipa/updates
%__mkdir_p %buildroot/%_datadir/ipa/ui/js/plugins/%{plugin_name}
targets="ipaserver"
for s in $targets ; do
%__mkdir_p %buildroot/%{ipa_python3_sitelib}/$s/plugins
for j in $(find plugin/$s/plugins -name '*.py') ; do
%__cp $j %buildroot/%{ipa_python3_sitelib}/$s/plugins
done
done
#for j in $(find plugin/schema.d -name '*.ldif') ; do
# %__cp $j %buildroot/%_datadir/ipa/schema.d
#done
#for j in $(find plugin/updates -name '*.update') ; do
# %__cp $j %buildroot/%_datadir/ipa/updates
#done
for j in $(find plugin/ui -name '*.js') ; do
%__cp $j %buildroot/%_datadir/ipa/ui/js/plugins/%{plugin_name}
done
%posttrans
ipa_interp=python3
$ipa_interp -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1
if [ $? -eq 0 ]; then
# This must be run in posttrans so that updates from previous
# execution that may no longer be shipped are not applied.
/usr/sbin/ipa-server-upgrade --quiet >/dev/null || :
# Restart IPA processes. This must be also run in postrans so that plugins
# and software is in consistent state
# NOTE: systemd specific section
/bin/systemctl is-enabled ipa.service >/dev/null 2>&1
if [ $? -eq 0 ]; then
/bin/systemctl restart ipa.service >/dev/null 2>&1 || :
fi
fi
%files
%license LICENSE
#%_datadir/ipa/schema.d/*
#%_datadir/ipa/updates/*
%_datadir/ipa/ui/js/plugins/%{plugin_name}/*
%files -n python3-ipa-%{plugin_name}-server
%{ipa_python3_sitelib}/ipaserver/plugins/*
%changelog
* Fri Feb 23 2024 Jasper Roloff <[email protected]> 0.1.8-1
- add "fedora:36" target ([email protected])
* Fri Feb 23 2024 Jasper Roloff <[email protected]> 0.1.7-2
- GitHub actions: fix syntax ([email protected])
* Fri Feb 23 2024 Jasper Roloff <[email protected]> 0.1.7-1
- GitHub actions: build for multiple targets ([email protected])
* Fri Feb 23 2024 Jasper Roloff <[email protected]> 0.1.6-1
- upgrade fedora to 37 ([email protected])
* Fri Feb 23 2024 Jasper Roloff <[email protected]> 0.1.5-1
- upgrade fedora to 36 ([email protected])
* Sun Jun 19 2022 Jasper Roloff <[email protected]> 0.1.4-1
- upgrade github actions ([email protected])
- fix build ([email protected])
- upgrade to fedora 35 ([email protected])
* Tue Aug 10 2021 Jasper Roloff <[email protected]> 0.1.3-1
- add hint for original project ([email protected])
* Tue Aug 10 2021 Jasper Roloff <[email protected]>
- add hint for original project ([email protected])
* Tue Aug 10 2021 Jasper Roloff <[email protected]> 0.1.2-1
- update gitignore ([email protected])
* Tue Aug 10 2021 Jasper Roloff <[email protected]>
- update gitignore ([email protected])
* Tue Aug 10 2021 Jasper Roloff <[email protected]> 0.1.1-1
-
* Tue Aug 10 2021 Jasper Roloff <[email protected]> 0.1.0-1
- Initial release