~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to build/rpm/tidy.spec

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Tidy version is 02 Oct 2003 that is 10022003
3
 
# First edit this file and set the version number
4
 
# You need to unpack the original source and edit the Makefile
5
 
# and point the prefix as follows:
6
 
#       runinst_prefix=${RPMTMP}
7
 
#       devinst_prefix=${RPMTMP}
8
 
# Copy this source tidy-MMDDYYYY.tgz to directory /usr/src/redhat/SOURCES
9
 
#
10
 
####################################################################
11
 
# To Build the new RPM package for tidy_rpm, to be uploaded 
12
 
# to ftp.redhat.com do the following:-
13
 
#  cd /usr/src/redhat; mkdir -p BUILD SRPMS RPMS/i386
14
 
#
15
 
#  Use the following commands - see 'man rpm' and 'man rpmbuild'
16
 
#  rpmbuild --showrc
17
 
#  To prep : rpmbuild --short-circuit -bp /usr/src/redhat/SPECS/tidy_rpm*.spec
18
 
#  Build   : rpmbuild --short-circuit -bc 
19
 
#  Install : rpmbuild --short-circuit -bi 
20
 
#  List    : rpmbuild --short-circuit -bl
21
 
#  Bin/Src : rpmbuild -ba
22
 
#  Build from TAR gzip source code with : rpmbuild -ta tidy.tar.gz
23
 
####################################################################
24
 
##
25
 
##  Preamble:
26
 
##
27
 
Summary: tidy - Program for tidying up messy HTML files
28
 
Name: tidy
29
 
 
30
 
# Version is 2 Oct 2003 - 10022003
31
 
Version: 02October2003
32
 
Release: 1
33
 
Copyright: GPL
34
 
Group: Applications/Tools
35
 
%define mainurl http://tidy.sourceforge.net
36
 
%define source_code_name  %{name}_src.tgz
37
 
%define url http://tidy.sourceforge.net
38
 
%define builddir  $RPM_BUILD_DIR/%{name}-%{version}
39
 
 
40
 
 
41
 
# You cannot have $$ (process id)in rpmtmp below since it will 
42
 
# be different for install and build sections
43
 
%define rpmtmp  $RPM_BUILD_DIR/rpm_tmp_directory-%{name}-%{version}-%{release}
44
 
 
45
 
#Source0: %{url}/%{name}-%{version}.tgz
46
 
Source0: %{url}/%{source_code_name}
47
 
#Source1: %{name}.init
48
 
#Source2: %{name}-%{version}.tgz
49
 
#Patch0: %{name}-%{version}-rh.patch
50
 
#Patch1: %{name}-%{version}-teo.patch
51
 
Packager:  Al Dev alavoor[at]yahoo.com
52
 
Buildroot: /var/tmp/%{name}-root
53
 
BuildArchitectures: noarch
54
 
#Prereq: /sbin/chkconfig /sbin/ldconfig /usr/sbin/useradd
55
 
Prereq: /usr/sbin/useradd
56
 
Url: %{url}
57
 
#Requires: %{name}
58
 
Summary(de): %{name} german-summary
59
 
Summary(fr): %{name} french-summary
60
 
Summary(tr): %{name} turkey-summary
61
 
 
62
 
##
63
 
##  Description
64
 
##
65
 
%description
66
 
%{name}: The tidy is a program for tidying up messy HTML files. 
67
 
When editing HTML its easy to make mistakes. Would not it be nice if 
68
 
there was a simple way to fix these mistakes automatically and tidy up 
69
 
sloppy editing into nicely layed out markup? Dave Raggetts HTML TIDY 
70
 
is a free utility for doing just that. It also works great on the 
71
 
atrociously hard to read markup generated by specialized HTML editors 
72
 
and conversion tools, and can help you identify where you need to pay 
73
 
further attention on making your pages more accessible to people 
74
 
with disabilities.
75
 
 
76
 
 
77
 
 
78
 
##
79
 
##  Prep section:
80
 
##
81
 
%prep
82
 
rm -rf $RPM_BUILD_ROOT
83
 
%setup -q
84
 
#%patch0 -p1 -b .rh
85
 
 
86
 
##
87
 
##  Build section:
88
 
##
89
 
%build
90
 
91
 
  echo "In build section ..."
92
 
  cd %{builddir}; 
93
 
  rm -rf %{rpmtmp}
94
 
  mkdir -p %{rpmtmp}
95
 
  export RPMTMP=%{rpmtmp}  # So that you can access from Makefiles with $(RPMTMP)
96
 
  #pwd && ./configure --prefix=%{rpmtmp}
97
 
  # If there is no configure then 
98
 
  # Should modify your Makefile using $(RPMTMP)
99
 
  pwd
100
 
  cd %{builddir}/build/gmake; 
101
 
  make all && make && make install
102
 
)
103
 
#( cd $RPM_BUILD_DIR; pwd && tar xzf %{builddir}.tgz )
104
 
 
105
 
 
106
 
 
107
 
##
108
 
##  Install section:
109
 
##
110
 
%install
111
 
rm -rf $RPM_BUILD_ROOT
112
 
PATH=/usr/sbin:$PATH 
113
 
#useradd -M -r -d /var/lib/%{name} -s /bin/bash \
114
 
#       -c "wvware package" %{name} || :
115
 
(
116
 
        # For maintaining separate versions of packages do ...
117
 
        #mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
118
 
        #cd $RPM_BUILD_ROOT/var/lib/%{name}/%{version}
119
 
        #cp -pr %{rpmtmp}/*  .
120
 
        #( cd $RPM_BUILD_ROOT/var/lib/%{name}; ln -s %{version} current )
121
 
 
122
 
        # Or alternatively copy to default locations as below...
123
 
        mkdir -p $RPM_BUILD_ROOT/usr
124
 
        cd $RPM_BUILD_ROOT
125
 
        mv %{rpmtmp}/* $RPM_BUILD_ROOT/usr
126
 
 
127
 
        #chown -R %{name}.%{name} *
128
 
        chmod -R 644 *  # read for all and write for user
129
 
        find . -type d -exec chmod a+rx {} \;
130
 
        find . -type f -name "*.so" -exec chmod a+rx {} \;
131
 
        #chmod a+rx run-%{name}  # read for all and write for user
132
 
)
133
 
 
134
 
##
135
 
##  Pre-install section:
136
 
##
137
 
%pre
138
 
#useradd -M -o -r -d /var/lib/%{name} -s /bin/bash \
139
 
#       -c "tidy Package" %{name} >/dev/null 2>&1 || :
140
 
 
141
 
#%post -p /sbin/ldconfig
142
 
 
143
 
#%postun -p /sbin/ldconfig clients
144
 
 
145
 
#%preun
146
 
#if [ $1 = 0 ] ; then
147
 
#       chkconfig --del %{name}
148
 
#fi
149
 
 
150
 
#%postun
151
 
#/sbin/ldconfig
152
 
#if [ $1 = 0 ] ; then
153
 
#       userdel %{name} >/dev/null 2>&1 || : 
154
 
#fi
155
 
 
156
 
##
157
 
##  Clean section:
158
 
##
159
 
%clean
160
 
rm -rf $RPM_BUILD_ROOT
161
 
rm -rf %{rpmtmp}
162
 
 
163
 
##
164
 
##  Files section:
165
 
##
166
 
# ----> These are files in the %{name}-x.x.x.rpm package
167
 
%files
168
 
#%defattr(-,%{name},%{name})
169
 
#%defattr(-,root,root)
170
 
#%config /etc/rc.d/init.d/*
171
 
#%doc doc/*.ps.gz
172
 
#%doc howto
173
 
#
174
 
# Use either /, or /usr or /var as below :
175
 
/
176
 
#
177
 
# ----> These are files in the %{name}-data-*.rpm package
178
 
#%files data
179
 
#%attr(-,%{name},%{name}) %dir /var/lib/%{name}
180
 
#%attr(-,%{name},%{name}) %config /var/lib/%{name}/*
181
 
#/usr/bin/somefilename
182
 
 
183
 
################################################################
184
 
%changelog
185
 
* Mon Oct 25 2003 Al Dev (Alavoor Vasudevan) <alavoor[at]yahoo.com>
186
 
- Initial version of %{name} rpm
187
 
################################################################