]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - tftp/tftp.nm
elfutils: Correctly configure debuginfod
[people/pmueller/ipfire-3.x.git] / tftp / tftp.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = tftp
7 version = 5.2
8 release = 1
9
10 groups = Applications/Network
11 url = http://www.kernel.org/pub/software/network/tftp/
12 license = BSD
13 summary = Client and server for the Trivial File Transfer Protocol (TFTP).
14
15 description
16 The Trivial File Transfer Protocol (TFTP) is normally used only for
17 booting diskless workstations.
18 end
19
20 thisapp = %{name}-hpa-%{version}
21
22 source_dl = http://www.kernel.org/pub/software/network/tftp/tftp-hpa/
23
24
25 build
26 requires
27 autoconf
28 readline-devel
29 shadow-utils
30 end
31
32 prepare_cmds
33 autoreconf -vfi
34 %{create_user}
35 end
36
37 make_install_targets += \
38 INSTALLROOT=%{BUILDROOT}
39
40 install_cmds
41 mkdir -pv %{BUILDROOT}%{sharedstatedir}/tftpboot
42 chown tftp:tftp %{BUILDROOT}%{sharedstatedir}/tftpboot
43 end
44 end
45
46 create_user
47 getent group tftp >/dev/null || /usr/sbin/groupadd -r tftp
48 getent passwd tftp >/dev/null || /usr/sbin/useradd -r -g tftp \
49 -d %{sharedstatedir}/tftpboot -s /sbin/nologin tftp
50 end
51
52 packages
53 package %{name}
54 requires
55 %{name}-client = %{thisver}
56 %{name}-server = %{thisver}
57 end
58 end
59
60 package %{name}-client
61 summary = A client programm for the Trivial File Transfer Protocol (TFTP).
62 description
63 The tftp-client package provides the user
64 interface for TFTP, which allows users to transfer files to and from a
65 remote machine. This program and TFTP provide very little security,
66 and should not be enabled unless it is expressly needed.
67 end
68
69 files
70 %{bindir}/tftp
71 %{mandir}/man1/tftp*
72 end
73 end
74
75 package %{name}-server
76 summary = A Trivial File Transfer Protocol (TFTP) server.
77 description
78 The tftp-server package provides the
79 server for TFTP, which allows users to transfer files to and from a
80 remote machine. TFTP provides very little security, and should not be
81 enabled unless it is expressly needed.
82 end
83
84 prerequires += \
85 shadow-utils
86
87 datafiles
88 %{sharedstatedir}/tftpboot
89 end
90
91 files
92 %{sbindir}/in.tftpd
93 %{mandir}/man8/*
94 %{unitdir}/tftp.*
95 %{sharedstatedir}/tftpboot
96 end
97
98 script prein
99 %{create_user}
100 end
101
102 script postin
103 systemctl daemon-reload >/dev/null 2>&1 || :
104 end
105
106 script preun
107 systemctl --no-reload disable tftp.socket >/dev/null 2>&1 || :
108 systemctl stop tftp.socket >/dev/null 2>&1 || :
109 systemctl stop tftp.service >/dev/null 2>&1 || :
110 end
111
112 script postun
113 systemctl daemon-reload >/dev/null 2>&1 || :
114 end
115
116 script postup
117 systemctl daemon-reload >/dev/null 2>&1 || :
118 systemctl try-restart tftp.service >/dev/null 2>&1 || :
119 end
120 end
121
122 package %{name}-debuginfo
123 template DEBUGINFO
124 end
125 end