source: opsi/server/wsusoffline/wsusoffline.spec@ 1019

Last change on this file since 1019 was 1018, checked in by joergs, on Jun 5, 2012 at 12:09:35 PM

adapted to build again at SUSE and RedHat

File size: 3.1 KB
Line 
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
19Name: wsusoffline
20Group: System/Management
21Version: 7.3.2
22%define ver "732"
23Release: 1
24Summary: WSUS Offline Update: download Microsoft updates
25License: GPLv2+
26URL: http://www.wsusoffline.net/
27Source: %{name}_%{version}.orig.tar.gz
28#Source99: #{name}-rpmlintrc
29BuildRoot: %{_tmppath}/%{name}-%{version}-build
30BuildRequires: unzip
31
32# for goupadd
33%if 0%{?suse_version}
34#Requires(pre): shadow-utils
35#else
36Requires(pre): pwdutils
37%endif
38Requires(pre): /usr/bin/groupadd
39
40
41Requires: cabextract dos2unix md5deep xmlstarlet wget
42BuildArch: noarch
43
44%description
45"WSUS Offline Update" allows you to download most Microsoft updates and store them localy.
46This includes Windows, Office and some extensions like dotnet or Powershell.
47After downloading, they can be installed on any Microsoft Windows system without an Internet connection.
48Also unattended/silient installation are possible, so the update be be included easily in a Windows software management system like http://www.opsi.org
49
50%prep
51%setup -c
52
53
54%build
55
56
57
58%install
59%define DEST_DIR /var/lib/wsusoffline/
60mkdir -p $RPM_BUILD_ROOT/var/lib/
61unzip wsusoffline/%{name}%{ver}.zip -d $RPM_BUILD_ROOT/var/lib/
62install -d $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
63
64
65# remove windows only stuff
66rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.exe
67rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.au3
68rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/bin
69rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/cmd
70
71# adapt permissions
72chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}
73find $RPM_BUILD_ROOT/%{DEST_DIR}/client/ -type d -exec chmod g+ws {} \;
74chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/exclude/
75chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/log/
76chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/iso/
77chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/sh/
78chmod a+x $RPM_BUILD_ROOT/%{DEST_DIR}/sh/*
79chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
80
81
82# install start wrapper scripts
83mkdir -p $RPM_BUILD_ROOT/usr/bin/
84install wsusoffline/*.sh $RPM_BUILD_ROOT/usr/bin/
85
86
87
88%clean
89rm -rf %{buildroot}
90
91%pre
92getent group wsusoffline >/dev/null || groupadd -r wsusoffline
93
94
95%files
96%defattr(-,root,root)
97/usr/bin/wsus-*.sh
98%dir %{DEST_DIR}
99# #{DEST_DIR}/bin
100# #{DEST_DIR}/cmd
101%{DEST_DIR}/doc
102%{DEST_DIR}/static
103%{DEST_DIR}/xslt
104
105%defattr(-,root,wsusoffline)
106%{DEST_DIR}/client/
107%{DEST_DIR}/exclude/
108%{DEST_DIR}/iso/
109%{DEST_DIR}/log/
110%{DEST_DIR}/sh/
111%{DEST_DIR}/temp/
112
113%changelog
Note: See TracBrowser for help on using the repository browser.