Revert "follow firefox by droping libs/devel packages"
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 May 2019 07:31:48 +0000 (09:31 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 May 2019 07:31:48 +0000 (09:31 +0200)
This reverts commit f8370e53ac1902b8e8106461dff720f0bad8ed20.

firefox52-esr.spec
xulrunner-pc.patch [new file with mode: 0644]

index a86b346dbb049858a5c26daa7360668bec50f4a3..fbb60350838ec20c10bc4b3b3a6a248a973a3103 100644 (file)
@@ -50,6 +50,7 @@ Patch7:               %{_basename}-middle_click_paste.patch
 Patch8:                %{_basename}-system-virtualenv.patch
 Patch9:                %{_basename}-Disable-Firefox-Health-Report.patch
 Patch10:       freetype.patch
+Patch11:       xulrunner-pc.patch
 URL:           https://www.mozilla.org/firefox/
 BuildRequires: OpenGL-devel
 BuildRequires: alsa-lib-devel
@@ -118,38 +119,17 @@ BuildRequires:    zlib-devel >= 1.2.3
 BuildConflicts:        %{name}-devel < %{version}
 Requires(post):        mktemp >= 1.5-18
 Requires:      browser-plugins >= 2.0
-Requires:      cairo >= 1.10.2-5
-Requires:      dbus-glib >= 0.60
 Requires:      desktop-file-utils
-Requires:      fontconfig-libs >= 1:2.7.0
-Requires:      glib2 >= 1:2.22
-%{!?with_gtk3:Requires:        gtk+2 >= 2:2.18.0}
-%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
 Requires:      hicolor-icon-theme
-Requires:      libjpeg-turbo
-Requires:      libpng >= 2:1.6.25
-Requires:      libpng(APNG) >= 0.10
-Requires:      libvpx >= 1.5.0
 Requires:      myspell-common
-Requires:      nspr >= 1:%{nspr_ver}
-Requires:      nss >= 1:%{nss_ver}
-Requires:      pango >= 1:1.22.0
-Requires:      sqlite3 >= %{sqlite_build_version}
-Requires:      startup-notification >= 0.8
+Requires:      %{name}-libs = %{version}-%{release}
 Provides:      wwwbrowser
-Provides:      xulrunner-libs = 2:%{version}-%{release}
-Obsoletes:     firefox-devel
-Obsoletes:     firefox-libs
-Obsoletes:     firefox52-esr-libs
 Obsoletes:     iceweasel
-Obsoletes:     iceweasel-libs
 Obsoletes:     mozilla-firebird
 Obsoletes:     mozilla-firefox
 Obsoletes:     mozilla-firefox-lang-en < 2.0.0.8-3
-Obsoletes:     mozilla-firefox-libs
 Obsoletes:     xulrunner
 Obsoletes:     xulrunner-gnome
-Obsoletes:     xulrunner-libs < 42
 Conflicts:     firefox-lang-resources < %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -180,6 +160,59 @@ Firefox jest przeglądarką WWW rozpowszechnianą zgodnie z ideami
 ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze
 standardami, wydajnością i przenośnością.
 
+%package libs
+Summary:       Firefox shared libraries
+Summary(pl.UTF-8):     Biblioteki współdzielone Firefoksa
+Group:         X11/Libraries
+Requires:      cairo >= 1.10.2-5
+Requires:      dbus-glib >= 0.60
+Requires:      fontconfig-libs >= 1:2.7.0
+Requires:      glib2 >= 1:2.22
+%{!?with_gtk3:Requires:        gtk+2 >= 2:2.18.0}
+%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
+Requires:      libjpeg-turbo
+Requires:      libpng >= 2:1.6.25
+Requires:      libpng(APNG) >= 0.10
+Requires:      libvpx >= 1.5.0
+Requires:      nspr >= 1:%{nspr_ver}
+Requires:      nss >= 1:%{nss_ver}
+Requires:      pango >= 1:1.22.0
+Requires:      sqlite3 >= %{sqlite_build_version}
+Requires:      startup-notification >= 0.8
+Provides:      xulrunner-libs = 2:%{version}-%{release}
+Obsoletes:     firefox-libs
+Obsoletes:     iceweasel-libs
+Obsoletes:     mozilla-firefox-libs
+Obsoletes:     xulrunner-libs < 2:%{version}
+
+%description libs
+XULRunner shared libraries.
+
+%description libs -l pl.UTF-8
+Biblioteki współdzielone XULRunnera.
+
+%package devel
+Summary:       Headers for developing programs that will use Firefox
+Summary(pl.UTF-8):     Pliki nagłówkowe do tworzenia programów używających Firefoksa
+Group:         X11/Development/Libraries
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      nspr-devel >= 1:%{nspr_ver}
+Requires:      nss-devel >= 1:%{nss_ver}
+Requires:      python-ply
+Provides:      xulrunner-devel = 2:%{version}-%{release}
+Obsoletes:     firefox-devel
+Obsoletes:     iceweasel-devel
+Obsoletes:     mozilla-devel
+Obsoletes:     mozilla-firefox-devel
+Obsoletes:     seamonkey-devel
+Obsoletes:     xulrunner-devel
+
+%description devel
+Firefox development package.
+
+%description devel -l pl.UTF-8
+Pakiet programistyczny Firefoksa.
+
 %prep
 %setup -q -n %{_basename}-%{version}esr
 
@@ -199,6 +232,7 @@ echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Mak
 %patch8 -p2
 %patch9 -p1
 %patch10 -p2
+%patch11 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' xpcom/typelib/xpt/tools/xpt.py xpcom/idl-parser/xpidl/xpidl.py
 
@@ -307,21 +341,42 @@ install -d \
        $RPM_BUILD_ROOT%{_desktopdir} \
        $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \
        $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \
+       $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/{lib,bin} \
        $RPM_BUILD_ROOT%{_includedir}/%{name} \
+       $RPM_BUILD_ROOT%{_datadir}/idl/%{name} \
        $RPM_BUILD_ROOT%{_pkgconfigdir}
 
 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
 
 cd obj-%{_target_cpu}
-%{__make} -C browser/installer stage-package \
+%{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \
        DESTDIR=$RPM_BUILD_ROOT \
+       INSTALL_SDK=1 \
        PKG_SKIP_STRIP=1 \
        idldir=%{_datadir}/idl/%{name} \
        includedir=%{_includedir}/%{name} \
        installdir=%{_libdir}/%{name} \
        sdkdir=%{_libdir}/%{name}-devel
 
+cp -aL browser/installer/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
 cp -aL dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
+cp -aL dist/idl/* $RPM_BUILD_ROOT%{_datadir}/idl/%{name}
+cp -aL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
+cp -aL dist/include/xpcom-config.h $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
+cp -aL dist/sdk/lib/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib
+cp -aL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin
+find $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk -name "*.pyc" | xargs rm -f
+
+ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/bin
+ln -s %{_includedir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/include
+ln -s %{_datadir}/idl/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/idl
+ln -s %{_libdir}/%{name}-devel/sdk/lib $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/lib
+
+# replace copies with symlinks
+%{?with_shared_js:ln -sf %{_libdir}/%{name}/libmozjs.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozjs.so}
+ln -sf %{_libdir}/%{name}/libxul.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libxul.so
+# temp fix for https://bugzilla.mozilla.org/show_bug.cgi?id=63955
+chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin/xpt.py
 
 # move arch independant ones to datadir
 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome
@@ -446,6 +501,8 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
 %{!?with_system_icu:%{_libdir}/%{name}//icudt58l.dat}
 
+%files libs
+%defattr(644,root,root,755)
 %dir %{_libdir}/%{name}
 %{_libdir}/%{name}/platform.ini
 %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
@@ -461,3 +518,31 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
 %attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so
 %endif
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/%{name}
+%{_datadir}/idl/%{name}
+%dir %{_libdir}/%{name}-devel
+%{_libdir}/%{name}-devel/bin
+%{_libdir}/%{name}-devel/idl
+%{_libdir}/%{name}-devel/lib
+%{_libdir}/%{name}-devel/include
+%{_libdir}/%{name}-devel/*.h
+%dir %{_libdir}/%{name}-devel/sdk
+%{_libdir}/%{name}-devel/sdk/lib
+%dir %{_libdir}/%{name}-devel/sdk/bin
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py
+%{_libdir}/%{name}-devel/sdk/bin/xpidllex.py
+%{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py
+%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py
+%{_libdir}/%{name}-devel/sdk/bin/ply
+
+%{_pkgconfigdir}/libxul.pc
+%{_pkgconfigdir}/libxul-embedding.pc
+%{_pkgconfigdir}/mozilla-js.pc
+%{_pkgconfigdir}/mozilla-plugin.pc
diff --git a/xulrunner-pc.patch b/xulrunner-pc.patch
new file mode 100644 (file)
index 0000000..ab603e0
--- /dev/null
@@ -0,0 +1,140 @@
+--- firefox-47.0/browser/installer/Makefile.in.orig    2016-06-01 06:11:40.000000000 +0200
++++ firefox-47.0/browser/installer/Makefile.in 2016-06-08 09:04:03.153657968 +0200
+@@ -160,6 +160,57 @@
+       -diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
+       rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
++# Add pkg-config files to the install:: target
++pkg_config_files = \
++      libxul.pc \
++      libxul-embedding.pc \
++      mozilla-js.pc \
++      mozilla-plugin.pc \
++      $(NULL)
++
++ifdef MOZ_SYSTEM_NSPR
++NSPR_NAME=nspr
++NSPR_VERSION=$(shell $(NSPR_CONFIG) --version)
++else
++pkg_config_files += mozilla-nspr.pc
++NSPR_NAME=mozilla-nspr
++FULL_NSPR_CFLAGS=-I\$${includedir}
++FULL_NSPR_LIBS=$(subst $(prefix),\$${sdkdir},$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
++NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
++endif
++
++MOZ_XUL_LINK = -lxpcomglue_s -lxul
++ifdef JS_SHARED_LIBRARY
++MOZ_JS_LINK = -lmozjs
++else
++FINDPATH=bin
++MOZ_JS_LINK = $(MOZ_XUL_LINK)
++endif
++
++%.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
++      cat $< | sed \
++      -e "s|%prefix%|$(prefix)|" \
++      -e "s|%includedir%|$(includedir)|" \
++      -e "s|%idldir%|$(idldir)|" \
++      -e "s|%sdkdir%|$(sdkdir)|" \
++      -e "s|%libdir%|$(installdir)|" \
++      -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
++      -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
++      -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
++      -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
++      -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
++      -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
++      -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
++      -e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \
++      -e "s|%MOZ_JS_LINK%|$(MOZ_JS_LINK)|" > $@
++      chmod 644 $@
++
++install:: $(pkg_config_files)
++      @echo pkg_config_file: $(pkg_config_files)
++      $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
++
++GARBAGE += $(pkg_config_files)
++
+ installer::
+ ifdef INSTALLER_DIR
+       $(MAKE) -C $(INSTALLER_DIR)
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/libxul-embedding.pc.in      2016-06-08 09:03:04.106295573 +0200
+@@ -0,0 +1,11 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++includedir=%includedir%
++idldir=%idldir%
++
++Name: libxul-embedding
++Description: Static library for version-independent embedding of the Mozilla runtime
++Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
++Libs: -L${sdkdir}/lib -lxpcomglue -ldl
++Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/libxul.pc.in        2016-06-08 09:03:44.546774985 +0200
+@@ -0,0 +1,12 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++libdir=%libdir%
++includedir=%includedir%
++idldir=%idldir%
++
++Name: libxul
++Description: The Mozilla Runtime and Embedding Engine
++Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
++Libs: -L${sdkdir}/lib %MOZ_XUL_LINK%
++Cflags: -I${includedir} %WCHAR_CFLAGS%
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/mozilla-js.pc.in    2016-06-08 09:03:36.890018556 +0200
+@@ -0,0 +1,10 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++includedir=%includedir%
++
++Name: JavaScript
++Description: The Mozilla JavaScript Library
++Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
++Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
++Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/mozilla-nspr.pc.in  2016-05-03 07:31:12.000000000 +0200
+@@ -0,0 +1,11 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++includedir=%includedir%/nspr
++
++Name: NSPR
++Description: The Netscape Portable Runtime
++Version: %NSPR_VERSION%
++Libs: %FULL_NSPR_LIBS%
++Cflags: %FULL_NSPR_CFLAGS%
++
++
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/mozilla-nss.pc.in   2016-05-03 07:31:12.000000000 +0200
+@@ -0,0 +1,10 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++includedir=%includedir%/nss
++
++Name: NSS
++Description: Mozilla Network Security Services
++Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
++Libs: -L${sdkdir}/lib -lsmime3 -lssl3 -lnss3 -lnssutil3
++Cflags: -I${includedir}
+--- /dev/null  2016-06-08 08:45:36.745941113 +0200
++++ firefox-47.0/browser/installer/mozilla-plugin.pc.in        2016-05-03 07:31:12.000000000 +0200
+@@ -0,0 +1,8 @@
++prefix=%prefix%
++sdkdir=%sdkdir%
++includedir=%includedir%
++
++Name: Mozilla Plug-In API
++Description: Mozilla Plug-In API
++Version: %MOZILLA_VERSION%
++Cflags: -I${includedir} -DXP_UNIX
This page took 0.938169 seconds and 4 git commands to generate.