Git init
[external/insserv.git] / packaging / insserv.spec
1 Name: insserv
2 License: GPL v2 or later
3 Group: System/Base
4 Provides: /sbin/insserv
5 Version: 1.12.0
6 Release: 1
7 Summary: A Program to Arrange Initialization Scripts
8
9 Source0: insserv-%{version}.tar.gz
10 Source1: devfsd
11 Source2: hotplug
12 Source3: hotplug-net
13 Source4: initrd-tools.sh
14 Source5: modutils
15 Source6: check-initd-order
16 Source7: check-archive-initd-scripts
17 Source8: seq-changes
18 Source9: make-testsuite
19 Source10: update-bootsystem-insserv
20 Source11: update-rc.d-insserv
21 Source12: bash-completion
22
23 Patch0: 10_nosuse.patch
24 Patch1: 11_debian_conf.patch
25 Patch2: 20_install_perms_fixup.patch
26 Patch3: 21_tests_suite_new_functions.patch
27 Patch4: 30_deterministic_order.patch
28 Patch5: 40_badboy_segfault.patch
29 Patch6: 50_symlink_in_initddir.patch
30 Patch7: 61_interactive_keyword.patch
31 Patch8: 62_upstart_job.patch
32 Patch9: 70_req_start_all_depends.patch 
33 Patch10: 71_complete_makefile.patch
34 Patch11: 81_lessverbose.patch
35 Patch12: 82_loop_exit_msg.patch
36 Patch13: 91_kfreebsd_nofadvice.patch
37 Patch14: 92_m68k_alignment.patch
38 Patch15: 93_hurd_no_path_max.patch
39 Patch16: 94_v1_12_2.patch
40 Patch17: 95_stop_all.patch
41 Patch18: 96_hurd_no_at_funcs.patch
42
43 %description
44 Insserv enables an installed system init script (boot script) by
45 reading the comment header of the script and calculating the
46 dependencies between all scripts.
47
48
49 %prep
50 %setup
51
52 %patch0 -p1 -b .10_nosuse
53 %patch1 -p1 -b .11_debian_conf.patch
54 %patch2 -p1 -b .20_install_perms_fixup.patch
55 %patch3 -p1 -b .21_tests_suite_new_functions.patch
56 %patch4 -p1 -b .30_deterministic_order.patch
57 %patch5 -p1 -b .40_badboy_segfault.patch
58 %patch6 -p1 -b .50_symlink_in_initddir.patch
59 %patch7 -p1 -b .61_interactive_keyword.patch
60 %patch8 -p1 -b .62_upstart_job.patch
61 %patch9 -p1 -b .70_req_start_all_depends.patch
62 %patch10 -p1 -b .71_complete_makefile.patch
63 %patch11 -p1 -b .81_lessverbose.patch
64 %patch12 -p1 -b .82_loop_exit_msg.patch
65 %patch13 -p1 -b .91_kfreebsd_nofadvice.patch
66 %patch14 -p1 -b .92_m68k_alignment.patch
67 %patch15 -p1 -b .93_hurd_no_path_max.patch
68 %patch16 -p1 -b .94_v1_12_2.patch
69 %patch17 -p1 -b .95_stop_all.patch
70 %patch18 -p1 -b .96_hurd_no_at_funcs.patch
71
72
73 %build
74 make INITDIR=%{_sysconfdir}/init.d INSCONF=%{_sysconfdir}/insserv.conf
75
76 %install
77 make install DESTDIR=%{buildroot}
78
79 # Install overrides
80 install -d %{buildroot}/%{_datadir}/%{name}/overrides/
81 for src in %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5; do
82         install -m 644 $src %{buildroot}/%{_datadir}/%{name}/overrides/
83 done
84
85 # install
86 for src in %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9; do
87         install $src %{buildroot}/%{_datadir}/%{name}/
88 done
89
90 install -d %{buildroot}/%{_sbindir}
91 install %SOURCE10 %{buildroot}/%{_sbindir}/
92 install %SOURCE11 %{buildroot}/%{_sbindir}/
93
94 # Install bash(1) completion
95 install -d %{buildroot}/%{_sysconfdir}/bash_completion.d
96 install -m 644 %SOURCE12 %{buildroot}/%{_sysconfdir}/bash_completion.d/insserv
97
98 install -d %{buildroot}/var/lib/update-rc.d %{buildroot}/%{_sysconfdir}/insserv.conf.d
99
100 %files
101 %defattr(-,root,root)
102 %config %{_sysconfdir}/%{name}.conf
103 /sbin/insserv
104 %{_sbindir}/*
105 %{_datadir}/%{name}/*
106 %{_mandir}/man8/insserv.8.gz
107 %dir /var/lib/update-rc.d
108 %dir %{_sysconfdir}/insserv.conf.d
109 %{_sysconfdir}/bash_completion.d/insserv