RPM-specfile for tidy and libtidy

PHP5 needs headerfiles for compiling libtidy. After not finding a suitable RPM in RedHats Repository i decided to whip up my own one. The specfile builds a tidy RPM containing shared-objects and CLI-Tools. The devel-headers get packaged into the tidy-devel RPM. The devel headers worked nicely for building php5.1.6.

File: tidy.spec

Summary: HTML Tidy Library Project
Name: tidy
Version: 26oct05
Release: 0
URL: http://tidy.sourceforge.net/
License: MIT License
Group: System Environment/Libraries
Source: http://download.sourceforge.net/tidy/tidy%{version}.tgz
Buildroot: %{_tmppath}/tidy-%{version}-%{release}-build
Provides: libtidy = %{version}-%{release}

%description
Tidy reads HTML, XHTML and XML files and writes cleaned up
markup. For HTML variants, it detects and corrects many
common coding errors and strives to produce visually
equivalent markup that is both W3C compliant and works on
most browsers. A common use of Tidy is to convert plain
HTML to XHTML. For generic XML files, Tidy is limited to
correcting basic well-formedness errors and pretty printing.

%package -n %{name}-devel
Summary: Header files and libraries for tidy.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Provides: libtidy-devel = %{version}-%{release}

%description -n %{name}-devel
This package contains the header files and libraries needed to
develop programs that use the tidy library.

%prep
%setup -q -n tidy
/bin/sh build/gnuauto/setup.sh
./configure --prefix=$RPM_BUILD_ROOT/usr

%build
make

%install
make install

%files -n %{name}
%{_prefix}/bin/tab2space
%{_prefix}/bin/tidy
%{_prefix}/lib/libtidy-0.99.so.0.0.0
%{_prefix}/lib/libtidy.a
%{_prefix}/lib/libtidy.la

%files -n %{name}-devel
%{_prefix}/include/buffio.h
%{_prefix}/include/fileio.h
%{_prefix}/include/platform.h
%{_prefix}/include/tidy.h
%{_prefix}/include/tidyenum.h

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: