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

Last change on this file since 1142 was 1142, checked in by joergs, on Jan 25, 2013 at 12:45:18 PM

include patch

File size: 3.3 KB
Line 
1#
2# spec file for package
3#
4# Copyright (c) 2013 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: 8.0.0
22%define ver "80"
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}
34Requires(pre): pwdutils
35%else
36#Requires(pre): shadow-utils
37Requires(pre): /usr/bin/groupadd
38%endif
39
40Requires: cabextract md5deep xmlstarlet wget
41BuildArch: noarch
42
43%description
44"WSUS Offline Update" allows you to download most Microsoft updates and store them localy.
45This includes Windows, Office and some extensions like dotnet or Powershell.
46After downloading, they can be installed on any Microsoft Windows system without an Internet connection.
47Also unattended/silient installation are possible, so the update be be included easily in a Windows software management system like http://www.opsi.org
48
49%prep
50%setup -c
51
52
53%build
54
55
56
57%install
58%define DEST_DIR /var/lib/wsusoffline/
59mkdir -p $RPM_BUILD_ROOT/var/lib/
60unzip wsusoffline/%{name}%{ver}.zip -d $RPM_BUILD_ROOT/var/lib/
61PATCH=$PWD/wsusoffline/download-updates.patch
62cd $RPM_BUILD_ROOT/%{DEST_DIR}
63ls
64patch -p1 < $PATCH
65cd -
66install -d $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
67
68
69# remove windows only stuff
70rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.exe
71rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/*.au3
72rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/bin
73rm -r $RPM_BUILD_ROOT/%{DEST_DIR}/cmd
74
75# adapt permissions
76chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}
77find $RPM_BUILD_ROOT/%{DEST_DIR}/client/ -type d -exec chmod g+ws {} \;
78chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/exclude/
79chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/log/
80chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/iso/
81# checkconnection downloads file into this directory
82chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/sh/
83chmod a+x $RPM_BUILD_ROOT/%{DEST_DIR}/sh/*
84find $RPM_BUILD_ROOT/%{DEST_DIR}/static/ -type d -exec chmod g+ws {} \;
85chmod g+ws $RPM_BUILD_ROOT/%{DEST_DIR}/temp/
86
87
88# install start wrapper scripts
89mkdir -p $RPM_BUILD_ROOT/usr/bin/
90install wsusoffline/*.sh $RPM_BUILD_ROOT/usr/bin/
91
92
93
94%clean
95rm -rf %{buildroot}
96
97%pre
98getent group wsusoffline >/dev/null || groupadd -r wsusoffline
99
100
101%files
102%defattr(-,root,root)
103/usr/bin/wsus-*.sh
104%dir %{DEST_DIR}
105# #{DEST_DIR}/bin
106# #{DEST_DIR}/cmd
107%{DEST_DIR}/doc/
108%{DEST_DIR}/sh/
109%{DEST_DIR}/xslt/
110
111%defattr(-,root,wsusoffline)
112%{DEST_DIR}/client/
113%{DEST_DIR}/exclude/
114%{DEST_DIR}/iso/
115%{DEST_DIR}/log/
116%{DEST_DIR}/static
117%{DEST_DIR}/temp/
118
119%changelog
Note: See TracBrowser for help on using the repository browser.