From da4cbfa82c5d93649471939645403ab31da0b8fd Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Nov 27 2007 19:05:22 +0000 Subject: Initial import into F-8. Modified Files: F-8/.cvsignore F-8/sources Added Files: F-8/htsglobal.h F-8/httrack-3.42-desktop.patch F-8/httrack-3.42-generic-macros.patch F-8/httrack-3.42-libhtsjava.patch F-8/httrack-3.42-openssl.patch F-8/httrack-3.42-utf-8.patch F-8/httrack-3.42-xdg-utils.patch F-8/httrack.spec --- diff --git a/.cvsignore b/.cvsignore index e69de29..b0e76bf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +httrack-3.42.tar.gz diff --git a/htsglobal.h b/htsglobal.h new file mode 100644 index 0000000..68f3dd9 --- /dev/null +++ b/htsglobal.h @@ -0,0 +1,419 @@ +/* ------------------------------------------------------------ */ +/* +HTTrack Website Copier, Offline Browser for Windows and Unix +Copyright (C) Xavier Roche and other contributors + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +Important notes: + +- We hereby ask people using this source NOT to use it in purpose of grabbing +emails addresses, or collecting any other private information on persons. +This would disgrace our work, and spoil the many hours we spent on it. + + +Please visit our Website: http://www.httrack.com +*/ + + +/* ------------------------------------------------------------ */ +/* File: Global #define file */ +/* Author: Xavier Roche */ +/* ------------------------------------------------------------ */ + +// Fichier r�unissant l'ensemble des defines + +#ifndef HTTRACK_GLOBAL_DEFH +# define HTTRACK_GLOBAL_DEFH + +// Version +# define HTTRACK_VERSION "3.42" +# define HTTRACK_VERSIONID "3.42.1" +# define HTTRACK_AFF_VERSION "3.x" +# define HTTRACK_LIB_VERSION "2.0" + +# ifndef HTS_NOINCLUDES +# ifndef _WIN32_WCE +# include +# include +# else +# include +# include +# ifdef HTS_CECOMPAT +# include "cecompat.h" +# else +# include "celib.h" +# endif +# endif +# endif + +// D�finition plate-forme +# include "htsconfig.h" + +# ifndef HTS_LONGLONG +# define HTS_LONGLONG 1 +# endif + +# define HTS_DLOPEN 1 + +// don't spare memory usage by default +# ifndef HTS_SPARE_MEMORY +# define HTS_SPARE_MEMORY 0 +# endif + +# ifndef BIGSTK +# define BIGSTK +# endif + +// compatibilit� DOS +# ifdef _WIN32 +# define HTS_DOSNAME 1 +# else +# define HTS_DOSNAME 0 +# endif + +// utiliser zlib? +# ifndef HTS_USEZLIB +// autoload +# define HTS_USEZLIB 1 +# endif + +# ifndef HTS_INET6 +# define HTS_INET6 0 +# endif + +// utiliser openssl? +# ifndef HTS_USEOPENSSL +// autoload +# define HTS_USEOPENSSL 1 +# endif + +// utiliser mms://? +# ifndef HTS_USEMMS +# define HTS_USEMMS 1 +# endif + +# ifndef HTS_DLOPEN +# define HTS_DLOPEN 1 +# endif + +# ifndef HTS_USESWF +# define HTS_USESWF 1 +# endif + +# ifdef _WIN32 +# else +# define __cdecl +# endif + +/* rc file */ +# ifdef _WIN32 +# define HTS_HTTRACKRC "httrackrc" +# else + +# ifndef HTS_ETCPATH +# define HTS_ETCPATH "/etc" +# endif +# ifndef HTS_BINPATH +# define HTS_BINPATH "/usr/bin" +# endif +# ifndef HTS_LIBPATH +# define HTS_LIBPATH "/usr/lib" +# endif +# ifndef HTS_PREFIX +# define HTS_PREFIX "/usr" +# endif + +# define HTS_HTTRACKRC ".httrackrc" +# define HTS_HTTRACKCNF HTS_ETCPATH"/httrack.conf" + +# ifdef DATADIR +# define HTS_HTTRACKDIR DATADIR"/httrack/" +# else +# define HTS_HTTRACKDIR HTS_PREFIX"/share/httrack/" +# endif + +# endif + +# if HTS_SPARE_MEMORY==0 +/* Gestion des tables de hashage */ +# define HTS_HASH_SIZE 20147 +/* Taille max d'une URL */ +# define HTS_URLMAXSIZE 1024 +/* Taille max ligne de commande (>=HTS_URLMAXSIZE*2) */ +# define HTS_CDLMAXSIZE 1024 +# else +/* Gestion des tables de hashage */ +# define HTS_HASH_SIZE 1023 +/* Taille max d'une URL */ +# define HTS_URLMAXSIZE 256 +/* Taille max ligne de commande (>=HTS_URLMAXSIZE*2) */ +# define HTS_CDLMAXSIZE 1024 +# endif + +/* Copyright (C) Xavier Roche and other contributors */ +# define HTTRACK_AFF_AUTHORS "[XR&CO'2007]" +# define HTS_DEFAULT_FOOTER "" +# define HTTRACK_WEB "http://www.httrack.com" +# define HTS_UPDATE_WEBSITE "http://www.httrack.com/update.php3?Product=HTTrack&Version="HTTRACK_VERSIONID"&VersionStr="HTTRACK_VERSION"&Platform=%d&Language=%s" + +# define H_CRLF "\x0d\x0a" +# define CRLF "\x0d\x0a" +# ifdef _WIN32 +# define LF "\x0d\x0a" +# else +# define LF "\x0a" +# endif + +/* �quivaut � "param�tre vide", par exemple -F (none) */ +# define HTS_NOPARAM "(none)" +# define HTS_NOPARAM2 "\"(none)\"" + +/* maximum et minimum */ +# define maximum(A,B) ( (A) > (B) ? (A) : (B) ) +# define minimum(A,B) ( (A) < (B) ? (A) : (B) ) + +/* chaine vide? */ +# define strnotempty(A) (((A)[0]!='\0') ? 1 : 0) + +/* optimisation inline si possible */ +# ifdef __cplusplus +# define HTS_INLINE inline +# else +# define HTS_INLINE +# endif + +# ifdef _WIN32 +# ifdef LIBHTTRACK_EXPORTS +# define HTSEXT_API __declspec(dllexport) +# else +# define HTSEXT_API __declspec(dllimport) +# endif +# else +# define HTSEXT_API +# endif + +# ifndef HTS_LONGLONG +# ifdef HTS_NO_64_BIT +# define HTS_LONGLONG 0 +# else +# define HTS_LONGLONG 1 +# endif +# endif + +// long long int? (or int) +// (and int cast for system functions like malloc() ) + +# if HTS_LONGLONG +# ifdef LLINT_FORMAT +typedef LLINT_TYPE LLint; +typedef LLINT_TYPE TStamp; +# define LLintP LLINT_FORMAT +# else + +# ifdef _WIN32 +typedef __int64 LLint; +typedef __int64 TStamp; +# define LLintP "%I64d" +# elif (defined(__x86_64__) || defined(_LP64) || defined(__64BIT__)) +typedef unsigned long int LLint; +typedef unsigned long int TStamp; +# define LLintP "%ld" +# else +typedef long long int LLint; +typedef long long int TStamp; +# define LLintP "%lld" +# endif + +# endif + /* HTS_LONGLONG */ + +# else +typedef int LLint; +# define LLintP "%d" +typedef double TStamp; +# endif + +# ifdef LFS_FLAG +typedef LLint INTsys; +# define INTsysP LLintP +# ifdef __linux +# define HTS_FSEEKO +# endif +# else +typedef int INTsys; +# define INTsysP "%d" +# endif + +# ifdef _WIN32 +# if defined(_WIN64) +typedef unsigned __int64 T_SOC; +# else +typedef unsigned __int32 T_SOC; +# endif +# else +typedef int T_SOC; +# endif + +/* Default alignement */ +# ifndef HTS_ALIGN +# define HTS_ALIGN (sizeof(void*)) +# endif + +/* IPV4, IPV6 and various unified structures */ +# define HTS_MAXADDRLEN 64 + +# ifdef _WIN32 +# else +# define __cdecl +# endif + +/* mode pour mkdir ET chmod (acc�s aux fichiers) */ +# define HTS_PROTECT_FOLDER (S_IRUSR|S_IWUSR|S_IXUSR) +# if HTS_ACCESS +# define HTS_ACCESS_FILE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) +# define HTS_ACCESS_FOLDER (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) +# else +# define HTS_ACCESS_FILE (S_IRUSR|S_IWUSR) +# define HTS_ACCESS_FOLDER (S_IRUSR|S_IWUSR|S_IXUSR) +# endif + +/* v�rifier la d�claration des variables pr�processeur */ +# ifndef HTS_DOSNAME +# error | HTS_DOSNAME Has not been defined. +# error | Set it to 1 if you are under DOS, 0 under Unix. +# error | Example: place this line in you source, before includes: +# error | #define HTS_DOSNAME 0 +# error +# error +# endif +# ifndef HTS_ACCESS +/* Par d�faut, acc�s � tous les utilisateurs */ +# define HTS_ACCESS 1 +# endif + +/* fflush sur stdout */ +# define io_flush { fflush(stdout); fflush(stdin); } + + + +/* HTSLib */ + +// Cache DNS, acc�l�re les r�solution d'adresses +# define HTS_DNSCACHE 1 + +// ID d'une pseudo-socket locale pour les file:// +# define LOCAL_SOCKET_ID -500000 + +// taille de chaque buffer (10 sockets 650 ko) +# if HTS_SPARE_MEMORY==0 +# define TAILLE_BUFFER 65536 +# else +# define TAILLE_BUFFER 8192 +# endif + +# ifdef HTS_DO_NOT_USE_PTHREAD +# error needs threads support +# endif +# define USE_BEGINTHREAD 1 + +# ifdef _DEBUG +// trace mallocs +//#define HTS_TRACE_MALLOC +# ifdef HTS_TRACE_MALLOC +typedef unsigned long int t_htsboundary; +# ifndef HTS_DEF_FWSTRUCT_mlink +# define HTS_DEF_FWSTRUCT_mlink +typedef struct mlink mlink; +# endif +struct mlink +{ + char *adr; + int len; + int id; + struct mlink *next; +}; +static const t_htsboundary htsboundary = 0xDEADBEEF; +# endif +# endif + +/* strxxx debugging */ +# ifndef NOSTRDEBUG +# define STRDEBUG 1 +# endif + + +/* ------------------------------------------------------------ */ +/* Debugging */ +/* ------------------------------------------------------------ */ + +// d�buggage types +# define DEBUG_SHOWTYPES 0 +// backing debug +# define BDEBUG 0 +// chunk receive +# define CHUNKDEBUG 0 +// realloc links debug +# define MDEBUG 0 +// cache debug +# define DEBUGCA 0 +// DNS debug +# define DEBUGDNS 0 +// savename debug +# define DEBUG_SAVENAME 0 +// debug robots +# define DEBUG_ROBOTS 0 +// debug hash +# define DEBUG_HASH 0 +// V�rification d'int�grit� +# define DEBUG_CHECKINT 0 +// nbr sockets debug +# define NSDEBUG 0 + +// d�buggage HTSLib +# define HDEBUG 0 +// surveillance de la connexion +# define CNXDEBUG 0 +// debuggage cookies +# define DEBUG_COOK 0 +// d�buggage hard.. +# define HTS_WIDE_DEBUG 0 +// debuggage deletehttp et cie +# define HTS_DEBUG_CLOSESOCK 0 +// debug tracage m�moire +# define MEMDEBUG 0 + +// htsmain +# define DEBUG_STEPS 0 + + +// D�buggage de contr�le +# if HTS_DEBUG_CLOSESOCK +# define _HTS_WIDE 1 +# endif +# if HTS_WIDE_DEBUG +# define _HTS_WIDE 1 +# endif +# if _HTS_WIDE +extern FILE *DEBUG_fp; +# define DEBUG_W(A) { if (DEBUG_fp==NULL) DEBUG_fp=fopen("bug.out","wb"); fprintf(DEBUG_fp,":>"A); fflush(DEBUG_fp); } +# undef _ +# define _ , +# endif + + + +#endif diff --git a/httrack-3.42-desktop.patch b/httrack-3.42-desktop.patch new file mode 100644 index 0000000..4f636b0 --- /dev/null +++ b/httrack-3.42-desktop.patch @@ -0,0 +1,38 @@ +diff -urNp httrack-3.42.1.orig/html/server/div/WebHTTrack.desktop httrack-3.42.1/html/server/div/WebHTTrack.desktop +--- httrack-3.42.1.orig/html/server/div/WebHTTrack.desktop 2003-05-31 19:03:58.000000000 +0530 ++++ httrack-3.42.1/html/server/div/WebHTTrack.desktop 2007-11-18 18:38:47.000000000 +0530 +@@ -1,12 +1,10 @@ + [Desktop Entry] ++Encoding=UTF-8 + Version=1.0 + Type=Application +-Categories=Application;Network ++Categories=Network; + Terminal=false + Name=WebHTTrack Website Copier + Comment=Copy websites to your computer + Exec=webhttrack +-Icon=/usr/share/httrack/icons/webhttrack.xpm +-Terminal=false +-MultipleArgs=false +-Type=Application ++Icon=webhttrack +diff -urNp httrack-3.42.1.orig/html/server/div/WebHTTrack-Websites.desktop httrack-3.42.1/html/server/div/WebHTTrack-Websites.desktop +--- httrack-3.42.1.orig/html/server/div/WebHTTrack-Websites.desktop 2003-06-01 21:53:02.000000000 +0530 ++++ httrack-3.42.1/html/server/div/WebHTTrack-Websites.desktop 2007-11-18 18:40:29.000000000 +0530 +@@ -1,12 +1,10 @@ + [Desktop Entry] ++Encoding=UTF-8 + Version=1.0 + Type=Application +-Categories=Application;Network ++Categories=Network; + Terminal=false + Name=Browse Mirrored Websites + Comment=Browse Websites Mirrored by WebHTTrack + Exec=webhttrack browse +-Icon=/usr/share/httrack/icons/webhttrack.xpm +-Terminal=false +-MultipleArgs=false +-Type=Application ++Icon=webhttrack diff --git a/httrack-3.42-generic-macros.patch b/httrack-3.42-generic-macros.patch new file mode 100644 index 0000000..2af0017 --- /dev/null +++ b/httrack-3.42-generic-macros.patch @@ -0,0 +1,102 @@ +diff -urNp httrack-3.42.1.orig/src/htscore.h httrack-3.42.1/src/htscore.h +--- httrack-3.42.1.orig/src/htscore.h 2006-08-15 18:32:08.000000000 +0530 ++++ httrack-3.42.1/src/htscore.h 2007-11-22 01:37:11.000000000 +0530 +@@ -43,24 +43,10 @@ Please visit our Website: http://www.htt + /* specific definitions */ + #include "htsbase.h" + // Includes & d�finitions +-#if ( defined(_WIN32) ||defined(HAVE_SYS_TYPES_H) ) + #include +-#endif +-#ifdef HAVE_SYS_STAT_H + #include +-#endif +-#ifdef _WIN32 +-#ifndef _WIN32_WCE +-#include +-#endif +-#ifndef _WIN32_WCE +-#include +-#endif +-#else +-#ifdef HAVE_UNISTD_H + #include +-#endif +-#endif ++ + /* END specific definitions */ + + /* Forward definitions */ +diff -urNp httrack-3.42.1.orig/src/htsnet.h httrack-3.42.1/src/htsnet.h +--- httrack-3.42.1.orig/src/htsnet.h 2007-02-03 19:05:56.000000000 +0530 ++++ httrack-3.42.1/src/htsnet.h 2007-11-22 01:44:05.000000000 +0530 +@@ -44,37 +44,23 @@ Please visit our Website: http://www.htt + #include "htsbasenet.h" + + #include +-#ifdef _WIN32 +- // pour read +-#ifndef _WIN32_WCE +- #include +-#endif +- // pour FindFirstFile +- #include +-#else + //typedef int T_SOC; +- #define INVALID_SOCKET -1 +- #include +- #include +- #include +- #include +- #include ++#define INVALID_SOCKET -1 ++#include ++#include ++#include ++#include ++#include + /* Force for sun env. */ +- #ifndef BSD_COMP +- #define BSD_COMP +- #endif +- #include +- /* gethostname & co */ +-#ifdef HAVE_UNISTD_H +- #include ++#ifndef BSD_COMP ++# define BSD_COMP + #endif ++#include ++ /* gethostname & co */ ++#include + /* inet_addr */ +- #include ++#include + // pas la peine normalement.. +-#ifndef HTS_DO_NOT_REDEFINE_in_addr_t +- typedef unsigned long in_addr_t; +-#endif +-#endif + + /* + ** ipV4 ** +diff -urNp httrack-3.42.1.orig/src/htsserver.h httrack-3.42.1/src/htsserver.h +--- httrack-3.42.1.orig/src/htsserver.h 2006-10-15 14:09:54.000000000 +0530 ++++ httrack-3.42.1/src/htsserver.h 2007-11-22 08:37:55.000000000 +0530 +@@ -39,12 +39,15 @@ Please visit our Website: http://www.htt + #ifndef HTS_SERVER_DEFH + #define HTS_SERVER_DEFH + ++#include ++#include ++#include ++ + #include "htsnet.h" + + /* String */ + #include "htsstrings.h" + +- + // Fonctions + void socinput(T_SOC soc,char* s,int max); + T_SOC smallserver_init_std(int* port_prox,char* adr_prox,int defaultPort); diff --git a/httrack-3.42-libhtsjava.patch b/httrack-3.42-libhtsjava.patch new file mode 100644 index 0000000..6452c9e --- /dev/null +++ b/httrack-3.42-libhtsjava.patch @@ -0,0 +1,21 @@ +diff -urNp httrack-3.42.1.orig/src/Makefile.in httrack-3.42.1/src/Makefile.in +--- httrack-3.42.1.orig/src/Makefile.in 2007-11-16 18:30:30.000000000 +0530 ++++ httrack-3.42.1/src/Makefile.in 2007-11-23 01:58:34.000000000 +0530 +@@ -221,7 +221,7 @@ libhttrack_la_LIBADD = $(THREADS_LIBS) $ + libhttrack_la_LDFLAGS = -version-info $(VERSION_INFO) + + libhtsjava_la_SOURCES = htsjava.c htsjava.h +-libhtsjava_la_LIBADD = $(THREADS_LIBS) $(DL_LIBS) ++libhtsjava_la_LIBADD = libhttrack.la + libhtsjava_la_LDFLAGS = -version-info $(VERSION_INFO) + + EXTRA_DIST = httrack.h webhttrack \ +@@ -250,7 +250,7 @@ CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = + LTLIBRARIES = $(lib_LTLIBRARIES) + +-libhtsjava_la_DEPENDENCIES = ++libhtsjava_la_DEPENDENCIES = libhttrack.la + am_libhtsjava_la_OBJECTS = htsjava.lo + libhtsjava_la_OBJECTS = $(am_libhtsjava_la_OBJECTS) + libhttrack_la_DEPENDENCIES = diff --git a/httrack-3.42-openssl.patch b/httrack-3.42-openssl.patch new file mode 100644 index 0000000..737e734 --- /dev/null +++ b/httrack-3.42-openssl.patch @@ -0,0 +1,12 @@ +diff -urNp httrack-3.42.1.orig/src/htsmodules.c httrack-3.42.1/src/htsmodules.c +--- httrack-3.42.1.orig/src/htsmodules.c 2007-02-03 19:05:56.000000000 +0530 ++++ httrack-3.42.1/src/htsmodules.c 2007-11-18 18:43:46.000000000 +0530 +@@ -263,7 +263,7 @@ void htspe_init(void) { + handle = LoadLibraryA((char*)"ssleay32"); + #else + /* We are compatible with 0.9.6/7/8 and potentially above */ +- handle = dlopen("libssl.so.0.9.8", RTLD_LAZY); ++ handle = dlopen("libssl.so.0.9.8b", RTLD_LAZY); + if (handle == NULL) { + handle = dlopen("libssl.so.0.9.7", RTLD_LAZY); + } diff --git a/httrack-3.42-utf-8.patch b/httrack-3.42-utf-8.patch new file mode 100644 index 0000000..b15f353 --- /dev/null +++ b/httrack-3.42-utf-8.patch @@ -0,0 +1,12 @@ +diff -urNp httrack-3.42.1.orig/html/contact.html httrack-3.42.1/html/contact.html +--- httrack-3.42.1.orig/html/contact.html 2007-01-14 19:37:06.000000000 +0530 ++++ httrack-3.42.1/html/contact.html 2007-11-18 18:49:48.000000000 +0530 +@@ -1,7 +1,7 @@ + + + +- ++ + + + HTTrack Website Copier - Offline Browser diff --git a/httrack-3.42-xdg-utils.patch b/httrack-3.42-xdg-utils.patch new file mode 100644 index 0000000..019d501 --- /dev/null +++ b/httrack-3.42-xdg-utils.patch @@ -0,0 +1,12 @@ +diff -urNp httrack-3.42.1.orig/src/webhttrack httrack-3.42.1/src/webhttrack +--- httrack-3.42.1.orig/src/webhttrack 2007-01-14 21:23:23.000000000 +0530 ++++ httrack-3.42.1/src/webhttrack 2007-11-18 18:51:32.000000000 +0530 +@@ -7,7 +7,7 @@ BROWSEREXE= + SRCHBROWSEREXE="x-www-browser www-browser iceape mozilla firefox firebird galeon konqueror opera netscape" + if test -n "${BROWSER}"; then + # sensible-browser will f up if BROWSER is not set +-SRCHBROWSEREXE="sensible-browser ${SRCHBROWSEREXE}" ++SRCHBROWSEREXE="xdg-open sensible-browser ${SRCHBROWSEREXE}" + fi + SRCHPATH="/usr/local/bin /usr/share/bin /usr/bin /usr/lib/httrack /usr/local/lib/httrack /usr/local/share/httrack /sw/bin ${HOME}/usr/bin ${HOME}/bin" + SRCHPATH="$SRCHPATH "`echo $PATH | tr ":" " "` diff --git a/httrack.spec b/httrack.spec new file mode 100644 index 0000000..456eaab --- /dev/null +++ b/httrack.spec @@ -0,0 +1,207 @@ +%if 0%{?fc7} +%else + %define _remove_encoding --remove-key Encoding +%endif + +Summary: Website copier and offline browser +Name: httrack +Version: 3.42 +Release: 4%{?dist} +License: GPLv2+ +Group: Applications/Internet +URL: http://www.httrack.com/ +Source0: http://www.httrack.com/%{name}-3.42.tar.gz +Source1: htsglobal.h + +Patch0: %{name}-%{version}-desktop.patch +Patch1: %{name}-%{version}-generic-macros.patch +Patch2: %{name}-%{version}-libhtsjava.patch +Patch3: %{name}-%{version}-openssl.patch +Patch4: %{name}-%{version}-utf-8.patch +Patch5: %{name}-%{version}-xdg-utils.patch + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +Requires: openssl = 0.9.8b +Requires: xdg-utils + +BuildRequires: desktop-file-utils +BuildRequires: dos2unix +BuildRequires: zlib-devel + +%description +HTTrack is a free and easy-to-use offline browser utility. + +It allows the user to download a World Wide Web site from the Internet to a +local directory, building recursively all directories, getting HTML, images, +and other files from the server to your computer. HTTrack arranges the +original site's relative link-structure. HTTrack can also update an existing +mirrored site, and resume interrupted downloads. HTTrack is fully +configurable, and has an integrated help system. + +%package devel +Summary: Development files for %{name} +Group: Applications/Internet + +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%prep +%setup -q -n %{name}-3.42.1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +cp -p %{SOURCE1} ./src + +# Suppress rpmlint error. +chmod 644 `find . -name "*.c" -perm /111 -print` +chmod 644 `find . -name "*.h" -perm /111 -print` +dos2unix ./AUTHORS +dos2unix ./README +dos2unix ./gpl.txt +dos2unix ./gpl-fr.txt +dos2unix ./greetings.txt +dos2unix ./history.txt +dos2unix ./html/step3.html +dos2unix ./%{name}-doc.html +dos2unix ./libtest/*.c +dos2unix ./libtest/example.h +dos2unix ./libtest/readme.txt +dos2unix ./license.txt +dos2unix ./templates/*.html +iconv --from-code ISO8859-1 --to-code UTF-8 ./gpl-fr.txt \ + --output gpl-fr.utf-8 && mv gpl-fr.utf-8 ./gpl-fr.txt +iconv --from-code ISO8859-1 --to-code UTF-8 ./greetings.txt \ + --output greetings.utf-8 && mv greetings.utf-8 ./greetings.txt +iconv --from-code ISO8859-1 --to-code UTF-8 ./history.txt \ + --output history.utf-8 && mv history.utf-8 ./history.txt +iconv --from-code ISO8859-1 --to-code UTF-8 ./html/contact.html \ + --output contact.utf-8 && mv contact.utf-8 ./html/contact.html + +%build +%configure --disable-static + +# Parallel make does not work. +make + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps + +make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name "*.la" -delete + +# Remove generic header from /usr/include/httrack. +rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h + +# Remove unnecessary dynamic libraries from /usr/lib/httrack. +rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name} + +# There are symbolic links in /usr/share/doc/httrack. +# Use %doc instead. +rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} + +# Move libtest and templates from /usr/share/httrack to RPM_BUILD_DIR. +# To be later listed against %doc. +rm -rf ./libtest ./templates +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/libtest . +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/templates . + +# We need to have a symlink to html in /usr/share/httrack. +# The other is to be listed against %doc. +rm -rf ./html +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/html . +pushd $RPM_BUILD_ROOT%{_datadir}/%{name} + ln -s ../doc/%{name}-%{version}/html html +popd + +# icon +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/icons/webhttrack.xpm \ + $RPM_BUILD_ROOT%{_datadir}/pixmaps +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/icons + +desktop-file-install %{?_remove_encoding} --vendor fedora --delete-original \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/WebHTTrack.desktop + +desktop-file-install %{?_remove_encoding} --vendor fedora --delete-original \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/WebHTTrack-Websites.desktop + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS +%doc COPYING +%doc README +%doc gpl.txt +%doc gpl-fr.txt +%doc html +%doc %{name}-doc.html +%doc templates +%{_bindir}/htsserver +%{_bindir}/%{name} +%{_bindir}/proxytrack +%{_bindir}/webhttrack +%{_datadir}/applications/fedora-WebHTTrack.desktop +%{_datadir}/applications/fedora-WebHTTrack-Websites.desktop +%{_datadir}/pixmaps/%{name}.xpm +%{_datadir}/pixmaps/webhttrack.xpm +%{_libdir}/*.so.* +%{_mandir}/man1/htsserver.1.gz +%{_mandir}/man1/%{name}.1.gz +%{_mandir}/man1/proxytrack.1.gz +%{_mandir}/man1/webhttrack.1.gz + +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/* + +%files devel +%defattr(-,root,root,-) +%doc libtest +%{_libdir}/*.so + +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/* + +%changelog +* Tue Nov 27 2007 Debarshi Ray - 3.42-4 +- Removed Encoding from Desktop Entry for all distributions, except Fedora 7. + +* Fri Nov 23 2007 Debarshi Ray - 3.42-3 +- Mentioned openssl version explicitly as 0.9.8b. + +* Fri Nov 23 2007 Debarshi Ray - 3.42-2 +- Fixed undefined non-weak symbols and unused direct shared library + dependencies in libhtsjava.so.2. +- Fixed location of some documentation files. + +* Sun Nov 18 2007 Debarshi Ray - 3.42-1 +- Version bump to 3.42. +- Fixed header files to not use generic headers and macros in the publicly + exposed API. +- Removed Encoding from Desktop Entry. + +* Mon Nov 12 2007 Debarshi Ray - 3.41.3-2 +- Added 'Requires: openssl' and fixed the sources. +- Added 'Requires: xdg-utils' and fixed the sources. +- Removed 'Requires: openssl-devel' from -devel. +- Removed unnecessary dynamic libraries. + +* Mon Oct 29 2007 Debarshi Ray - 3.41.3-1 +- Initial build. Imported SPEC written by Yves Cluckers. +- Disabled parallel make to prevent failure with -j3. +- Changed character encodings from ISO8859-1 to UTF-8. +- Fixed .desktop files to comply with http://www.freedesktop.org/standards/. diff --git a/sources b/sources index e69de29..5cb4f57 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8bb5f09ee007fe6e9875c070b57e0359 httrack-3.42.tar.gz