netsrpms: some rework to build from specfile instead of srpm to let user do version changes on his own
flashplugin update to 11.2.202.394 skype update to 4.3.0.37 Conflicts: SRPMS/sun-java7/sun-java7.spec.in SRPMSVERSIONS SRPMSVERSIONS.arm
This commit is contained in:
parent
772a7d39cd
commit
7e280318f1
16
Makefile
16
Makefile
@ -1,5 +1,5 @@
|
||||
# Makefile for desktop-base-openmamba package
|
||||
# Copyright (C) 2004-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2004-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2005-2007 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
|
||||
include VERSION
|
||||
@ -120,13 +120,7 @@ pck_catalogs3 := $(wildcard openmamba-update/po/*.po)
|
||||
s,@distrodesktopdir@,$(distrodesktopdir),g;\
|
||||
s,@distrosrpmsdir@,$(distrosrpmsdir),g;\
|
||||
s,@wallpaper@,$(DEFAULT_WALLPAPER),g;\
|
||||
s,@screensaver@,${SCREENSAVER},g;\
|
||||
s,@flashpluginver@,${FLASHPLUGIN_VERSION},g;\
|
||||
s,@win32codecsver@,${WIN32CODECS_VERSION},g;\
|
||||
s,@sunjava7ver@,${SUN_JAVA7_VERSION},g;\
|
||||
s,@virtualboxextensionpackver@,${VIRTUALBOX_EXTENSION_PACK_VERSION},g;\
|
||||
s,@spotifyver@,${SPOTIFY_VERSION},g;\
|
||||
s,@skypever@,${SKYPE_VERSION},g" $< > $@
|
||||
s,@screensaver@,${SCREENSAVER},g" $< > $@
|
||||
|
||||
all: dist-update locales
|
||||
|
||||
@ -223,9 +217,9 @@ install-srpms:
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)
|
||||
@cat $(SRPMSVERSIONSFILE) > $(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE)
|
||||
for pck in $(pck_srpms); do\
|
||||
rpmbuild -bs SRPMS/$$pck/$${pck}.spec \
|
||||
--define="_sourcedir `pwd`/SRPMS/$$pck" \
|
||||
--define="_srcrpmdir $(DESTDIR)$(distrosrpmsdir)" || exit 1;\
|
||||
cp -a SRPMS/$$pck $(DESTDIR)$(distrosrpmsdir); \
|
||||
rm -f $(DESTDIR)$(distrosrpmsdir)/$$pck/distroutils.sysconfig*; \
|
||||
rm -f $(DESTDIR)$(distrosrpmsdir)/$$pck/*.spec.in; \
|
||||
cat SRPMS/$$pck/$(pck_sysconfigfile) >> \
|
||||
$(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE);\
|
||||
done
|
||||
|
@ -4,4 +4,4 @@
|
||||
FLASH_PLUGIN_PCK=install_flash_player_11_linux.@arch@.tar.gz
|
||||
|
||||
# package URL (do not modify unless you know what you're doing)
|
||||
FLASH_PLUGIN_URL=http://fpdownload.macromedia.com/get/flashplayer/pdc/${FLASHPLUGIN_VERSION}/
|
||||
FLASH_PLUGIN_URL=http://fpdownload.macromedia.com/get/flashplayer/pdc/${SRPMVERSION["flashplugin"]}/
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: flashplugin
|
||||
Version: @flashpluginver@
|
||||
Release: 1@distroext@
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Epoch: 1
|
||||
Summary: Macromedia Flash plugin for web browsers
|
||||
Group: Applications/Web
|
||||
@ -24,6 +24,7 @@ Macromedia Flash plugin for web browsers.
|
||||
%setup -c -n %{name}-%{version} -D -T
|
||||
|
||||
[ -r /etc/sysconfig/@sysconfigfile@ ] || exit 1
|
||||
declare -A SRPMVERSION SRPMRELEASE
|
||||
. /etc/sysconfig/@sysconfigfile@
|
||||
|
||||
[ "${FLASH_PLUGIN_PCK}" ] || exit 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: skype
|
||||
Version: @skypever@
|
||||
Release: @distroext@
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Epoch: 1
|
||||
Summary: An Internet voice and video communication software
|
||||
Group: Graphical Desktop/Applications/Internet
|
||||
|
@ -1,7 +1,7 @@
|
||||
#% define spotify_make_ver 20130831git
|
||||
Name: spotify
|
||||
Version: @spotifyver@
|
||||
Release: 1mamba
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Summary: Listen to music using Spotify
|
||||
Group: Graphical Desktop/Applications/Multimedia
|
||||
Vendor: @vendor@
|
||||
|
@ -22,8 +22,8 @@
|
||||
%define cgibindir %{_var}/www/cgi-bin
|
||||
|
||||
Name: sun-java7
|
||||
Version: @sunjava7ver@
|
||||
Release: 1@distroext@
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Epoch: 1
|
||||
Summary: Sun Java Developer's Kit
|
||||
Group: System/Libraries/Java
|
||||
|
@ -1,7 +1,7 @@
|
||||
## VirtualBox Extension Pack
|
||||
|
||||
# package name (do not modify unless you know what you're doing)
|
||||
VIRTUALBOX_EXTENSION_PACK_PCK=Oracle_VM_VirtualBox_Extension_Pack-@virtualboxextensionpackver@.vbox-extpack
|
||||
VIRTUALBOX_EXTENSION_PACK_PCK=Oracle_VM_VirtualBox_Extension_Pack-${SRPMVERSION["virtualbox-extension-pack"]}.vbox-extpack
|
||||
|
||||
# package URL (do not modify unless you know what you're doing)
|
||||
VIRTUALBOX_EXTENSION_PACK_URL=http://download.virtualbox.org/virtualbox/@virtualboxextensionpackver@/
|
||||
VIRTUALBOX_EXTENSION_PACK_URL=http://download.virtualbox.org/virtualbox/${SRPMVERSION["virtualbox-extension-pack"]}/
|
||||
|
@ -1,8 +1,8 @@
|
||||
%define pck_majver %(echo %version | cut -d. -f1-3)
|
||||
%define pck_minver %(echo %version | cut -d. -f4)
|
||||
Name: virtualbox-extension-pack
|
||||
Version: @virtualboxextensionpackver@
|
||||
Release: 1@distroext@
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Epoch: 1
|
||||
Summary: VirtualBox Extension Pack
|
||||
Group: Applications/Emulators
|
||||
|
@ -12,8 +12,8 @@
|
||||
%define alt_url10 ftp://ftp10.mplayerhq.hu/MPlayer/releases/codecs/
|
||||
|
||||
Name: win32codecs
|
||||
Version: @win32codecsver@
|
||||
Release: 1@distroext@
|
||||
Version: @SRPMVERSION@
|
||||
Release: @SRPMRELEASE@
|
||||
Summary: Win32 native dll codecs
|
||||
Group: System/Multimedia
|
||||
Vendor: @vendor@
|
||||
|
@ -1,6 +1,17 @@
|
||||
FLASHPLUGIN_VERSION=11.2.202.335
|
||||
WIN32CODECS_VERSION=20110131
|
||||
SKYPE_VERSION=4.2.0.11
|
||||
VIRTUALBOX_EXTENSION_PACK_VERSION=4.2.0
|
||||
SUN_JAVA7_VERSION=7u51
|
||||
SPOTIFY_VERSION=20140117
|
||||
SRPMVERSION["flashplugin"]=11.2.202.394
|
||||
SRPMRELEASE["flashplugin"]=1mamba
|
||||
|
||||
SRPMVERSION["win32codecs"]=20110131
|
||||
SRPMRELEASE["win32codecs"]=1mamba
|
||||
|
||||
SRPMVERSION["skype"]=4.3.0.37
|
||||
SRPMRELEASE["skype"]=1mamba
|
||||
|
||||
SRPMVERSION["virtualbox-extension-pack"]=4.2.0
|
||||
SRPMRELEASE["virtualbox-extension-pack"]=1mamba
|
||||
|
||||
SRPMVERSION["sun-java7"]=7u51
|
||||
SRPMRELEASE["sun-java7"]=2mamba
|
||||
|
||||
SRPMVERSION["spotify"]=20140117
|
||||
SRPMRELEASE["spotify"]=1mamba
|
||||
|
@ -1 +1,2 @@
|
||||
SUN_JAVA7_VERSION=7u45
|
||||
SRPMVERSION["sun-java7"]=7u51
|
||||
SRPMRELEASE["sun-java7"]=2mamba
|
||||
|
@ -43,22 +43,22 @@ function check_if_already_installed() {
|
||||
fi
|
||||
}
|
||||
|
||||
declare -A SRPMVERSION SRPMRELEASE
|
||||
. /etc/sysconfig/netsrpminstall || exit 1
|
||||
|
||||
for pckname in $PACKAGES; do
|
||||
|
||||
icon=`grep Icon= /usr/share/applications/openmamba-$pckname.desktop | sed "s|Icon=||"`
|
||||
|
||||
SRPM_NAME=`\
|
||||
find $DISTRO_SRPMS_DIR \
|
||||
-regex ".*/${pckname//+/\\+}-[^-]*-[^-]*" -printf "%f " 2>/dev/null`
|
||||
SRPM_PATH=$DISTRO_SRPMS_DIR/${pckname}
|
||||
SPEC_PATHNAME=$SRPM_PATH/${pckname}.spec
|
||||
|
||||
[ "$SRPM_NAME" ] || {
|
||||
[ "$SPEC_PATHNAME" ] || {
|
||||
echo $"$me: $pckname is missing in $DISTRO_SRPMS_DIR; aborting."
|
||||
exit 255
|
||||
}
|
||||
|
||||
SRPM_VERSION=`\
|
||||
echo $SRPM_NAME | \
|
||||
sed "s|${pckname//+/\\+}-\([^-]*-[^-]*\).src.rpm|\1|" 2>/dev/null`
|
||||
SPEC_VERSION=${SRPMVERSION[${pckname}]}-${SRPMRELEASE[${pckname}]}
|
||||
|
||||
RPM_INSTALLED=`rpm -q $pckname`
|
||||
[ $? -eq 0 ] || RPM_INSTALLED=
|
||||
@ -69,10 +69,10 @@ for pckname in $PACKAGES; do
|
||||
|
||||
echo $"Package name: $pckname"
|
||||
echo $"Installed version: $RPM_INSTALLED_VERSION"
|
||||
echo $"Last version: $SRPM_VERSION"
|
||||
echo $"Last version: $SPEC_VERSION"
|
||||
echo
|
||||
|
||||
if [ "$RPM_INSTALLED_VERSION" != "$SRPM_VERSION" ]; then
|
||||
if [ "$RPM_INSTALLED_VERSION" != "$SPEC_VERSION" ]; then
|
||||
if [ "$RPM_INSTALLED_VERSION" ]; then
|
||||
UPDATE_NEEDED=1
|
||||
elif [ "$UPGRADE_MODE" ]; then
|
||||
@ -83,36 +83,14 @@ for pckname in $PACKAGES; do
|
||||
fi
|
||||
|
||||
if [ ! "$CHECK_MODE" ]; then
|
||||
SRPM_PATH=${DISTRO_SRPMS_DIR}/${SRPM_NAME}
|
||||
|
||||
if [ ! -f $SRPM_PATH ]; then
|
||||
echo "$me: "$"missing SRPM \`$SRPM_PATH'."" "$"Aborting..." >&2
|
||||
exit 255
|
||||
fi
|
||||
|
||||
tmpfile=`mktemp -q -t $me.XXXXXXXX` || {
|
||||
echo "$me: "$"error: cannot create temporary files; aborting."
|
||||
exit 255
|
||||
}
|
||||
|
||||
tmpdir=`mktemp -d -q -t $me.XXXXXXXX` || {
|
||||
echo "$me: "$"error: cannot create temporary directory; aborting."
|
||||
exit 255
|
||||
}
|
||||
|
||||
# get license agreement
|
||||
( rpm2cpio $SRPM_PATH > $tmpfile &&
|
||||
cd $tmpdir &&
|
||||
cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null
|
||||
|
||||
if [ -f $tmpdir/LICENSE ]; then
|
||||
if [ -f ${SRPM_PATH}/LICENSE ]; then
|
||||
if [ "$DISPLAY" ]; then
|
||||
license-dialog $tmpdir/LICENSE
|
||||
license-dialog ${SRPM_PATH}/LICENSE
|
||||
[ $? -ne 0 ] && exit 1
|
||||
else
|
||||
echo $"You must accept the following license terms:"
|
||||
echo
|
||||
more $tmpdir/LICENSE
|
||||
more ${SRPM_PATH}/LICENSE
|
||||
echo -n $"Do you agree with the above license terms [y/N]? "
|
||||
read ans
|
||||
[ "$ans" = "Y" -o "$ans" = "y" ] || exit 1
|
||||
@ -122,10 +100,28 @@ for pckname in $PACKAGES; do
|
||||
notify-send -a $"Network software installation" -i $icon "$pckname" $"$pckname installation in progress..."
|
||||
|
||||
# build rpm
|
||||
echo "$me: "$"rebuilding package \`$SRPM_PATH'..."
|
||||
rpmbuild --rebuild $SRPM_PATH --define="%_rpmdir $tmpdir"
|
||||
tmpfile=`mktemp -q -t $me.XXXXXXXX` || {
|
||||
echo "$me: "$"error: cannot create temporary files; aborting."
|
||||
exit 255
|
||||
}
|
||||
|
||||
tmpdir=`mktemp -d -q -t $me.XXXXXXXX` || {
|
||||
echo "$me: "$"error: cannot create temporary directory; aborting."
|
||||
exit 255
|
||||
}
|
||||
|
||||
echo "$me: "$"rebuilding package \`$pckname'..."
|
||||
|
||||
sed "s|@SRPMVERSION@|${SRPMVERSION[${pckname}]}|g;s|@SRPMRELEASE@|${SRPMRELEASE[${pckname}]}|g" \
|
||||
${SPEC_PATHNAME} >> $tmpfile
|
||||
|
||||
rpmbuild --ba \
|
||||
--define="%_rpmdir $tmpdir" \
|
||||
--define="%_sourcedir ${SRPM_PATH}" \
|
||||
$tmpfile
|
||||
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "$me: "$"error rebuilding \`$SRPM_PATH'."" "$"Aborting..." >&2
|
||||
echo "$me: "$"error rebuilding \`$pckname'."" "$"Aborting..." >&2
|
||||
notify-send -a $"Network software installation" -i $icon "$pckname" $"There was an error installing"" $pckname!"
|
||||
exit 255
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user