1 | #
|
---|
2 | # spec file for package [spectemplate]
|
---|
3 | #
|
---|
4 | # Copyright (c) 2012 dass IT GmbH, Cologne, Germany.
|
---|
5 | #
|
---|
6 | # All modifications and additions to the file contributed by third parties
|
---|
7 | # remain the property of their copyright owners, unless otherwise agreed
|
---|
8 | # upon. The license for this file, and modifications and additions to the
|
---|
9 | # file, is the same license as for the pristine package itself (unless the
|
---|
10 | # license for the pristine package is not an Open Source License, in which
|
---|
11 | # case the license is the MIT License). An "Open Source License" is a
|
---|
12 | # license that conforms to the Open Source Definition (Version 1.9)
|
---|
13 | # published by the Open Source Initiative.
|
---|
14 |
|
---|
15 | # Please submit bugfixes or comments via packager@dass-it.de
|
---|
16 | #
|
---|
17 | # norootforbuild
|
---|
18 |
|
---|
19 | Name: wsusoffline
|
---|
20 | Group: System/Management
|
---|
21 | Version: 7.3.2
|
---|
22 | %define ver "732"
|
---|
23 | Release: 1
|
---|
24 | Summary: WSUS Offline Update: download Microsoft updates
|
---|
25 | License: GPLv2+
|
---|
26 | URL: http://www.wsusoffline.net/
|
---|
27 | Source: %{name}_%{version}.orig.tar.gz
|
---|
28 | #Source99: #{name}-rpmlintrc
|
---|
29 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
---|
30 | BuildRequires: unzip pwdutils
|
---|
31 | Requires: cabextract dos2unix md5deep xmlstarlet wget
|
---|
32 | BuildArch: noarch
|
---|
33 |
|
---|
34 | %description
|
---|
35 | "WSUS Offline Update" allows you to download most Microsoft updates and store them localy.
|
---|
36 | This includes Windows, Office and some extensions like dotnet or Powershell.
|
---|
37 | After downloading, they can be installed on any Microsoft Windows system without an Internet connection.
|
---|
38 | Also unattended/silient installation are possible, so the update be be included easily in a Windows software management system like http://www.opsi.org
|
---|
39 |
|
---|
40 | %prep
|
---|
41 | %setup -c
|
---|
42 |
|
---|
43 |
|
---|
44 | %build
|
---|
45 |
|
---|
46 |
|
---|
47 |
|
---|
48 | %install
|
---|
49 | %define DEST_DIR /var/lib/wsusoffline/
|
---|
50 | mkdir -p $RPM_BUILD_ROOT/var/lib/
|
---|
51 | unzip wsusoffline/%{name}%{ver}.zip -d $RPM_BUILD_ROOT/var/lib/
|
---|
52 | install -d $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
|
---|
53 |
|
---|
54 |
|
---|
55 | # remove windows only stuff
|
---|
56 | rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.exe
|
---|
57 | rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.au3
|
---|
58 | rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/bin
|
---|
59 | rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/cmd
|
---|
60 |
|
---|
61 | # adapt permissions
|
---|
62 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}
|
---|
63 | find $RPM_BUILD_ROOT/%{DEST_DIR}/client/ -type d -exec chmod g+ws {} \;
|
---|
64 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/exclude/
|
---|
65 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/log/
|
---|
66 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/iso/
|
---|
67 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/sh/
|
---|
68 | chmod a+x $RPM_BUILD_ROOT/%{DEST_DIR}/sh/*
|
---|
69 | chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
|
---|
70 |
|
---|
71 |
|
---|
72 | # install start wrapper scripts
|
---|
73 | mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
---|
74 | install wsusoffline/*.sh $RPM_BUILD_ROOT/usr/bin/
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|
78 | %clean
|
---|
79 | rm -rf %{buildroot}
|
---|
80 |
|
---|
81 | %pre
|
---|
82 | getent group wsusoffline >/dev/null || groupadd -r wsusoffline
|
---|
83 |
|
---|
84 |
|
---|
85 | %files
|
---|
86 | %defattr(-,root,root)
|
---|
87 | /usr/bin/wsus-*.sh
|
---|
88 | %dir %{DEST_DIR}
|
---|
89 | # #{DEST_DIR}/bin
|
---|
90 | # #{DEST_DIR}/cmd
|
---|
91 | %{DEST_DIR}/doc
|
---|
92 | %{DEST_DIR}/static
|
---|
93 | %{DEST_DIR}/xslt
|
---|
94 |
|
---|
95 | %defattr(-,root,wsusoffline)
|
---|
96 | %{DEST_DIR}/client/
|
---|
97 | %{DEST_DIR}/exclude/
|
---|
98 | %{DEST_DIR}/iso/
|
---|
99 | %{DEST_DIR}/log/
|
---|
100 | %{DEST_DIR}/sh/
|
---|
101 | %{DEST_DIR}/temp/
|
---|
102 |
|
---|
103 | %changelog
|
---|