Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37729168
en ru br
ALT Linux repos
S:0.3.1-alt1
5.0: 0.3.0-alt2
4.1: 0.3.0-alt2
4.0: 0.3.0-alt1
3.0: 0.2.1-alt2

Group :: Networking/Other
RPM: url_handler

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# Emacs, look here: -*- coding: cyrillic-cp1251 -*-
Name: url_handler
Version: 0.2.1
Release: alt2

Group: Networking/Other
Summary: Opens URLs of common types with dedicated programs.
Summary(ru_RU.CP1251): Открывает URL-ы обычных типов предназначенными для них программами.
License: GPL

Packager: Ivan Zakharyaschev <imz at altlinux.ru>

BuildArch: noarch

# There was a single pkg before: it used to unite urlview & url_handler.

Conflicts: urlview < 0.9-ipl8mdk

%define confdir %_sysconfdir/urlview

Requires: common-licenses
# the script uses tr:
Requires: coreutils

# Probably something like this should be present, but not now.

#Requires: webclient
# Now very few pkgs provide webclient.

# We use 'mailx' command not present in older mailx

Conflicts: mailx < 8.1.2-alt1

# 2 scripts of our own.

Source0: url_handler-alt-0.2.1.tar.gz

# All the patches are not applied, because they are already there.

# (They are saved for the purpose of tracking the changes.)

# Our patch - not applied

Patch2: urlview-0.9-paths.ALT.patch

# From Debian - not applied:

Patch4: urlview-0.9-add-nohup-flag.debian.patch

# Add more url-handlers - applied

Patch5: url_handlers-alt-add-new-handlers.patch

%description
%name can be used as a uniform centralized handler for URLs of common types
by other programs (e.g., urlview) or human users.
It has a configurable list of programs
dedicated to handling each specific URL type:
it is initialized to the list of the most popular programs.

Examples:

\#1
url_handler.sh http://lrn.ru \# open it in a browser

\#2
url_handler.sh ./manual.html \# view the local file from the working dir

%description -l ru_RU.CP1251
%name может быть использован другими программами (например, urlview)
или людьми-пользователями для единообразной централизованной обработки URL-ов
обычных типов. Имеется настраиваемый список программ, предназначенных для обработки каждого отдельного типа URL: изначально установлен список, перечисляющий самый популярные программы.

Примеры:

\#1
url_handler.sh http://lrn.ru \# открыть сайт в браузере

\#2
url_handler.sh ./manual.html \# посмотреть локальный файл из рабочей директории

%prep
%setup
%patch5 -p1

%install
mkdir -p "$RPM_BUILD_ROOT"{%_bindir,%confdir}
install -p -m755 url_handler.sh \
   "$RPM_BUILD_ROOT"%confdir
%__ln_s %confdir/url_handler.sh \
   "$RPM_BUILD_ROOT"%_bindir/url_handler.sh
install -p -m644 url_handlers \
   "$RPM_BUILD_ROOT"%confdir/

# link the license

%__ln_s -f %_licensedir/GPL-2 COPYING


%files

%dir %_sysconfdir/urlview
%config %confdir/url_handler.sh
%config(noreplace) %confdir/url_handlers

%_bindir/*

# Hack for symlink ;-)

%doc --no-dereference COPYING

# %triggerpostun  -- urlview < 0.9-ipl8mdk

# [ -e %_sysconfdir/urlview/url_handlers.rpmsave ] \
# && echo 'Consider moving your old configuration to the new location: mv %_sysconfdir/urlview/url_handlers.rpmsave %_sysconfdir/%name/url_handlers!' ||:

# [ -e %_sysconfdir/urlview/url_handler.sh.rpmsave ] \

# && echo 'Consider moving your old configuration to the new location: mv %_sysconfdir/urlview/url_handler.sh.rpmsave %_sysconfdir/%name/url_handler.sh!' ||:

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin