rpms/httrack/F-8 htsglobal.h, NONE, 1.1 httrack-3.42-desktop.patch, NONE, 1.1 httrack-3.42-generic-macros.patch, NONE, 1.1 httrack-3.42-libhtsjava.patch, NONE, 1.1 httrack-3.42-openssl.patch, NONE, 1.1 httrack-3.42-utf-8.patch, NONE, 1.1 httrack-3.42-xdg-utils.patch, NONE, 1.1 httrack.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Debarshi Ray (rishi) fedora-extras-commits at redhat.com
Tue Nov 27 19:05:54 UTC 2007


Author: rishi

Update of /cvs/pkgs/rpms/httrack/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24392/F-8

Modified Files:
	.cvsignore sources 
Added Files:
	htsglobal.h httrack-3.42-desktop.patch 
	httrack-3.42-generic-macros.patch 
	httrack-3.42-libhtsjava.patch httrack-3.42-openssl.patch 
	httrack-3.42-utf-8.patch httrack-3.42-xdg-utils.patch 
	httrack.spec 
Log Message:
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 



--- NEW FILE htsglobal.h ---
/* ------------------------------------------------------------ */
/*
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 <stdio.h>
#      include <stdlib.h>
#    else
#      include <stdio.h>
#      include <stdlib.h>
#      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 "<!-- Mirrored from %s%s by HTTrack Website Copier/"HTTRACK_AFF_VERSION" "HTTRACK_AFF_AUTHORS", %s -->"
#  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

httrack-3.42-desktop.patch:

--- NEW FILE httrack-3.42-desktop.patch ---
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

httrack-3.42-generic-macros.patch:

--- NEW FILE httrack-3.42-generic-macros.patch ---
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 <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
-#ifdef _WIN32
-#ifndef  _WIN32_WCE
-#include <conio.h>
-#endif
-#ifndef  _WIN32_WCE
-#include <direct.h>
-#endif
-#else
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#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 <ctype.h>
-#ifdef _WIN32
- // pour read
-#ifndef  _WIN32_WCE
- #include <io.h>
-#endif
- // pour FindFirstFile
- #include <winbase.h>
-#else
  //typedef int T_SOC;
- #define INVALID_SOCKET -1
- #include <netdb.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <sys/time.h>
+#define INVALID_SOCKET -1
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
  /* Force for sun env. */
- #ifndef BSD_COMP
- #define BSD_COMP
- #endif
- #include <sys/ioctl.h>
- /* gethostname & co */
-#ifdef HAVE_UNISTD_H
- #include <unistd.h>
+#ifndef BSD_COMP
+#  define BSD_COMP
 #endif
+#include <sys/ioctl.h>
+ /* gethostname & co */
+#include <unistd.h>
  /* inet_addr */
- #include <arpa/inet.h>
+#include <arpa/inet.h>
  // 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 <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #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);

httrack-3.42-libhtsjava.patch:

--- NEW FILE httrack-3.42-libhtsjava.patch ---
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 =

httrack-3.42-openssl.patch:

--- NEW FILE httrack-3.42-openssl.patch ---
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);
       }

httrack-3.42-utf-8.patch:

--- NEW FILE httrack-3.42-utf-8.patch ---
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 @@
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
 
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<meta name="description" content="HTTrack is an easy-to-use website mirror utility. It allows you to download a World Wide website from the Internet to a local directory,building recursively all structures, getting html, images, and other files from the server to your computer. Links are rebuiltrelatively so that you can freely browse to the local site (works with any browser). You can mirror several sites together so that you can jump from one toanother. You can, also, update an existing mirror site, or resume an interrupted download. The robot is fully configurable, with an integrated help" />
 	<meta name="keywords" content="httrack, HTTRACK, HTTrack, winhttrack, WINHTTRACK, WinHTTrack, offline browser, web mirror utility, aspirateur web, surf offline, web capture, www mirror utility, browse offline, local  site builder, website mirroring, aspirateur www, internet grabber, capture de site web, internet tool, hors connexion, unix, dos, windows 95, windows 98, solaris, ibm580, AIX 4.0, HTS, HTGet, web aspirator, web aspirateur, libre, GPL, GNU, free software" />
 	<title>HTTrack Website Copier - Offline Browser</title>

httrack-3.42-xdg-utils.patch:

--- NEW FILE httrack-3.42-xdg-utils.patch ---
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 ":" " "`


--- NEW FILE httrack.spec ---
%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 <rishi at fedoraproject.org> - 3.42-4
- Removed Encoding from Desktop Entry for all distributions, except Fedora 7.

* Fri Nov 23 2007 Debarshi Ray <rishi at fedoraproject.org> - 3.42-3
- Mentioned openssl version explicitly as 0.9.8b.

* Fri Nov 23 2007 Debarshi Ray <rishi at fedoraproject.org> - 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 <rishi at fedoraproject.org> - 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 <rishi at fedoraproject.org> - 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 <rishi at fedoraproject.org> - 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/.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/httrack/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Nov 2007 17:18:20 -0000	1.1
+++ .cvsignore	27 Nov 2007 19:05:22 -0000	1.2
@@ -0,0 +1 @@
+httrack-3.42.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/httrack/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Nov 2007 17:18:20 -0000	1.1
+++ sources	27 Nov 2007 19:05:22 -0000	1.2
@@ -0,0 +1 @@
+8bb5f09ee007fe6e9875c070b57e0359  httrack-3.42.tar.gz




More information about the fedora-extras-commits mailing list